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

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

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 25 alternatives:

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

Initial Program: 95.5% accurate, 1.0× speedup?

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

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

Alternative 1: 98.1% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(x - z \cdot \left(y + -1\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(y + -1\right)\right) + a \cdot \left(1 - t\right)\right) + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 2: 97.7% accurate, 0.1× speedup?

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

\\
\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)
\end{array}
Derivation
  1. Initial program 96.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. +-commutative96.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-def97.6%

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

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

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

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

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

      \[\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.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-neg98.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-eval98.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-neg98.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-neg98.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-eval98.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. Simplified98.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. Final simplification98.0%

    \[\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: 70.0% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;b \leq -8.2 \cdot 10^{-184}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.0999999999999999e-84 or 2.6999999999999998e77 < 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. Step-by-step derivation
      1. +-commutative93.4%

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, \color{blue}{x - \left(\left(y - 1\right) \cdot z - \left(-\left(t - 1\right) \cdot a\right)\right)}\right) \]
      8. fma-neg96.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-neg96.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-eval96.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-neg96.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-neg96.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-eval96.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. Simplified96.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 t around 0 91.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.0999999999999999e-84 < b < -8.2e-184 or -1.1e-285 < b < 2.6999999999999998e77

    1. Initial program 99.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. +-commutative99.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 t around 0 81.2%

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

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

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

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

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

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

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

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

    if -8.2e-184 < b < -1.1e-285

    1. Initial program 99.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.1 \cdot 10^{-84}:\\ \;\;\;\;\left(z + a\right) + b \cdot \left(t + \left(y + -2\right)\right)\\ \mathbf{elif}\;b \leq -8.2 \cdot 10^{-184}:\\ \;\;\;\;\left(x + a\right) + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq -1.1 \cdot 10^{-285}:\\ \;\;\;\;x - a \cdot \left(t + -1\right)\\ \mathbf{elif}\;b \leq 2.7 \cdot 10^{+77}:\\ \;\;\;\;\left(x + a\right) + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) + b \cdot \left(t + \left(y + -2\right)\right)\\ \end{array} \]

Alternative 4: 85.3% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;z \leq 1.15 \cdot 10^{+131}:\\
\;\;\;\;t_2 + t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.7999999999999998e91

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - y \cdot z\right) + \left(z - \color{blue}{\left(t + -1\right) \cdot a}\right) \]
      11. cancel-sign-sub-inv91.6%

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

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

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

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

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

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

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

    if -3.7999999999999998e91 < z < 1.14999999999999996e131

    1. Initial program 97.2%

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

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

    if 1.14999999999999996e131 < z

    1. Initial program 93.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+91}:\\ \;\;\;\;\left(x - y \cdot z\right) + \left(z + a \cdot \left(1 - t\right)\right)\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+131}:\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\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 5: 46.5% accurate, 1.2× speedup?

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

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

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

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

\mathbf{elif}\;t \leq 1.7 \cdot 10^{-154}:\\
\;\;\;\;z\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.1499999999999999e90 or 2.75e10 < t

    1. Initial program 95.7%

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

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

    if -2.1499999999999999e90 < t < -2.3000000000000001e-110 or 3.09999999999999996e-89 < t < 2.75e10

    1. Initial program 96.4%

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

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

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

    if -2.3000000000000001e-110 < t < 9.20000000000000046e-237 or 1.6999999999999999e-154 < t < 3.09999999999999996e-89

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

    if 9.20000000000000046e-237 < t < 1.6999999999999999e-154

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

        \[\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-def93.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+93.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-neg93.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-eval93.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-neg93.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-93.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-neg93.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-neg93.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-eval93.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-neg93.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-neg93.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-eval93.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. Simplified93.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. Taylor expanded in t around 0 93.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.15 \cdot 10^{+90}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{-110}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{-237}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-154}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-89}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 27500000000:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 6: 50.7% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq -1.9 \cdot 10^{-112}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 2.15 \cdot 10^{-150}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.02000000000000008e89 or 3e10 < t

    1. Initial program 95.7%

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

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

    if -2.02000000000000008e89 < t < -1.89999999999999997e-112 or 6.79999999999999976e-209 < t < 2.15000000000000002e-150 or 4.1e-113 < t < 3e10

    1. Initial program 94.7%

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

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

    if -1.89999999999999997e-112 < t < 6.79999999999999976e-209 or 2.15000000000000002e-150 < t < 4.1e-113

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.02 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-112}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-209}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{-150}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-113}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 30000000000:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 7: 50.5% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq -1.42 \cdot 10^{-111}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 5.2 \cdot 10^{-152}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.4999999999999997e86 or 2.75e10 < t

    1. Initial program 95.7%

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

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

    if -7.4999999999999997e86 < t < -1.41999999999999991e-111 or 3.79999999999999995e-112 < t < 2.75e10

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

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

    if -1.41999999999999991e-111 < t < 4.0000000000000003e-239 or 5.20000000000000026e-152 < t < 3.79999999999999995e-112

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

    if 4.0000000000000003e-239 < t < 5.20000000000000026e-152

    1. Initial program 94.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+86}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1.42 \cdot 10^{-111}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-239}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-152}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-112}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 27500000000:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 8: 53.3% accurate, 1.2× speedup?

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

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

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

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

\mathbf{elif}\;t \leq 2.2 \cdot 10^{+106}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -8.7999999999999996e54 or 1.1e9 < t < 2.19999999999999992e106 or 2.4e219 < t

    1. Initial program 93.9%

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

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

    if -8.7999999999999996e54 < t < 1.9999999999999999e-112

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e-112 < t < 1.1e9

    1. Initial program 90.8%

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

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

    if 2.19999999999999992e106 < t < 4.49999999999999983e123

    1. Initial program 100.0%

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

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

    if 4.49999999999999983e123 < t < 2.4e219

    1. Initial program 100.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.8 \cdot 10^{+54}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-112}:\\ \;\;\;\;a + \left(x + z\right)\\ \mathbf{elif}\;t \leq 1100000000:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{+106}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+123}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{+219}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 9: 52.9% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;b \leq -1.7 \cdot 10^{-116}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;b \leq 4.8 \cdot 10^{+102}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -8.2000000000000001e-54 or 4.79999999999999989e102 < b

    1. Initial program 92.9%

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

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

    if -8.2000000000000001e-54 < b < -1.69999999999999996e-116 or 9.4000000000000005e-281 < b < 4.79999999999999989e102

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.69999999999999996e-116 < b < -2.7999999999999999e-198

    1. Initial program 100.0%

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

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

    if -2.7999999999999999e-198 < b < 9.4000000000000005e-281

    1. Initial program 99.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8.2 \cdot 10^{-54}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -1.7 \cdot 10^{-116}:\\ \;\;\;\;a + \left(x + z\right)\\ \mathbf{elif}\;b \leq -2.8 \cdot 10^{-198}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 9.4 \cdot 10^{-281}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;b \leq 4.8 \cdot 10^{+102}:\\ \;\;\;\;a + \left(x + z\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]

Alternative 10: 64.2% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - a \cdot \left(t + -1\right)\\ t_2 := x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;b \leq -6.8 \cdot 10^{-63}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{-183}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.8 \cdot 10^{-127}:\\ \;\;\;\;\left(x + a\right) - y \cdot z\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{+55}:\\ \;\;\;\;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 -1.0)))) (t_2 (+ x (* b (- (+ y t) 2.0)))))
   (if (<= b -6.8e-63)
     t_2
     (if (<= b 2.5e-183)
       t_1
       (if (<= b 1.8e-127) (- (+ x a) (* y z)) (if (<= b 2.4e+55) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (a * (t + -1.0));
	double t_2 = x + (b * ((y + t) - 2.0));
	double tmp;
	if (b <= -6.8e-63) {
		tmp = t_2;
	} else if (b <= 2.5e-183) {
		tmp = t_1;
	} else if (b <= 1.8e-127) {
		tmp = (x + a) - (y * z);
	} else if (b <= 2.4e+55) {
		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 * (t + (-1.0d0)))
    t_2 = x + (b * ((y + t) - 2.0d0))
    if (b <= (-6.8d-63)) then
        tmp = t_2
    else if (b <= 2.5d-183) then
        tmp = t_1
    else if (b <= 1.8d-127) then
        tmp = (x + a) - (y * z)
    else if (b <= 2.4d+55) 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 + -1.0));
	double t_2 = x + (b * ((y + t) - 2.0));
	double tmp;
	if (b <= -6.8e-63) {
		tmp = t_2;
	} else if (b <= 2.5e-183) {
		tmp = t_1;
	} else if (b <= 1.8e-127) {
		tmp = (x + a) - (y * z);
	} else if (b <= 2.4e+55) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x - (a * (t + -1.0))
	t_2 = x + (b * ((y + t) - 2.0))
	tmp = 0
	if b <= -6.8e-63:
		tmp = t_2
	elif b <= 2.5e-183:
		tmp = t_1
	elif b <= 1.8e-127:
		tmp = (x + a) - (y * z)
	elif b <= 2.4e+55:
		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 + -1.0)))
	t_2 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0)))
	tmp = 0.0
	if (b <= -6.8e-63)
		tmp = t_2;
	elseif (b <= 2.5e-183)
		tmp = t_1;
	elseif (b <= 1.8e-127)
		tmp = Float64(Float64(x + a) - Float64(y * z));
	elseif (b <= 2.4e+55)
		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 + -1.0));
	t_2 = x + (b * ((y + t) - 2.0));
	tmp = 0.0;
	if (b <= -6.8e-63)
		tmp = t_2;
	elseif (b <= 2.5e-183)
		tmp = t_1;
	elseif (b <= 1.8e-127)
		tmp = (x + a) - (y * z);
	elseif (b <= 2.4e+55)
		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 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6.8e-63], t$95$2, If[LessEqual[b, 2.5e-183], t$95$1, If[LessEqual[b, 1.8e-127], N[(N[(x + a), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.4e+55], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq 2.5 \cdot 10^{-183}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -6.79999999999999997e-63 or 2.3999999999999999e55 < 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 z around 0 86.0%

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

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

    if -6.79999999999999997e-63 < b < 2.5000000000000001e-183 or 1.8e-127 < b < 2.3999999999999999e55

    1. Initial program 99.0%

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

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

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

    if 2.5000000000000001e-183 < b < 1.8e-127

    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 t around 0 92.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.8 \cdot 10^{-63}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{-183}:\\ \;\;\;\;x - a \cdot \left(t + -1\right)\\ \mathbf{elif}\;b \leq 1.8 \cdot 10^{-127}:\\ \;\;\;\;\left(x + a\right) - y \cdot z\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{+55}:\\ \;\;\;\;x - a \cdot \left(t + -1\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]

Alternative 11: 69.6% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;b \leq -2.1 \cdot 10^{-179}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 4.8 \cdot 10^{+102}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -52000 or 4.79999999999999989e102 < b

    1. Initial program 92.0%

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

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

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

    if -52000 < b < -2.0999999999999999e-179 or -3.25e-285 < b < 4.79999999999999989e102

    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. Step-by-step derivation
      1. +-commutative99.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-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 t around 0 82.0%

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

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

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

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

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

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

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

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

    if -2.0999999999999999e-179 < b < -3.25e-285

    1. Initial program 99.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -52000:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -2.1 \cdot 10^{-179}:\\ \;\;\;\;\left(x + a\right) + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq -3.25 \cdot 10^{-285}:\\ \;\;\;\;x - a \cdot \left(t + -1\right)\\ \mathbf{elif}\;b \leq 4.8 \cdot 10^{+102}:\\ \;\;\;\;\left(x + a\right) + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]

Alternative 12: 84.6% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -70000 \lor \neg \left(b \leq 3.2 \cdot 10^{+77}\right):\\
\;\;\;\;\left(z + a\right) + b \cdot \left(t + \left(y + -2\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -7e4 or 3.2000000000000002e77 < b

    1. Initial program 92.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. +-commutative92.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-def94.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+94.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-neg94.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-eval94.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-neg94.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-94.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-neg95.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7e4 < b < 3.2000000000000002e77

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - y \cdot z\right) + \left(z - \color{blue}{\left(t + -1\right) \cdot a}\right) \]
      11. cancel-sign-sub-inv91.9%

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

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

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

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

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

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

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

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

Alternative 13: 85.0% accurate, 1.2× speedup?

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

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

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

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


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

    1. Initial program 95.5%

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

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

    if -6.79999999999999997e-63 < b < 7.99999999999999937e81

    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 \color{blue}{\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - \left(-1 \cdot z + a \cdot \left(t - 1\right)\right)} \]
    3. Taylor expanded in b around 0 95.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.99999999999999937e81 < b

    1. Initial program 88.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. Step-by-step derivation
      1. +-commutative88.4%

        \[\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-def93.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+93.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-neg93.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-eval93.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-neg93.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-93.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-neg93.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-neg93.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-eval93.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-neg93.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-neg93.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-eval93.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. Simplified93.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 t around 0 90.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.8 \cdot 10^{-63}:\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 8 \cdot 10^{+81}:\\ \;\;\;\;\left(x - y \cdot z\right) + \left(z + a \cdot \left(1 - t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z + a\right) + b \cdot \left(t + \left(y + -2\right)\right)\\ \end{array} \]

Alternative 14: 61.4% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - a \cdot \left(t + -1\right)\\ t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;b \leq -0.000105:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 9.8 \cdot 10^{-183}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 5.4 \cdot 10^{-129}:\\ \;\;\;\;\left(x + a\right) - y \cdot z\\ \mathbf{elif}\;b \leq 2.25 \cdot 10^{+61}:\\ \;\;\;\;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 -1.0)))) (t_2 (* b (- (+ y t) 2.0))))
   (if (<= b -0.000105)
     t_2
     (if (<= b 9.8e-183)
       t_1
       (if (<= b 5.4e-129)
         (- (+ x a) (* y z))
         (if (<= b 2.25e+61) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (a * (t + -1.0));
	double t_2 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -0.000105) {
		tmp = t_2;
	} else if (b <= 9.8e-183) {
		tmp = t_1;
	} else if (b <= 5.4e-129) {
		tmp = (x + a) - (y * z);
	} else if (b <= 2.25e+61) {
		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 * (t + (-1.0d0)))
    t_2 = b * ((y + t) - 2.0d0)
    if (b <= (-0.000105d0)) then
        tmp = t_2
    else if (b <= 9.8d-183) then
        tmp = t_1
    else if (b <= 5.4d-129) then
        tmp = (x + a) - (y * z)
    else if (b <= 2.25d+61) 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 + -1.0));
	double t_2 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -0.000105) {
		tmp = t_2;
	} else if (b <= 9.8e-183) {
		tmp = t_1;
	} else if (b <= 5.4e-129) {
		tmp = (x + a) - (y * z);
	} else if (b <= 2.25e+61) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x - (a * (t + -1.0))
	t_2 = b * ((y + t) - 2.0)
	tmp = 0
	if b <= -0.000105:
		tmp = t_2
	elif b <= 9.8e-183:
		tmp = t_1
	elif b <= 5.4e-129:
		tmp = (x + a) - (y * z)
	elif b <= 2.25e+61:
		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 + -1.0)))
	t_2 = Float64(b * Float64(Float64(y + t) - 2.0))
	tmp = 0.0
	if (b <= -0.000105)
		tmp = t_2;
	elseif (b <= 9.8e-183)
		tmp = t_1;
	elseif (b <= 5.4e-129)
		tmp = Float64(Float64(x + a) - Float64(y * z));
	elseif (b <= 2.25e+61)
		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 + -1.0));
	t_2 = b * ((y + t) - 2.0);
	tmp = 0.0;
	if (b <= -0.000105)
		tmp = t_2;
	elseif (b <= 9.8e-183)
		tmp = t_1;
	elseif (b <= 5.4e-129)
		tmp = (x + a) - (y * z);
	elseif (b <= 2.25e+61)
		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 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -0.000105], t$95$2, If[LessEqual[b, 9.8e-183], t$95$1, If[LessEqual[b, 5.4e-129], N[(N[(x + a), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.25e+61], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq 9.8 \cdot 10^{-183}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 2.25 \cdot 10^{+61}:\\
\;\;\;\;t_1\\

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


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

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

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

    if -1.05e-4 < b < 9.799999999999999e-183 or 5.39999999999999998e-129 < b < 2.25e61

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

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

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

    if 9.799999999999999e-183 < b < 5.39999999999999998e-129

    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 t around 0 92.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -0.000105:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 9.8 \cdot 10^{-183}:\\ \;\;\;\;x - a \cdot \left(t + -1\right)\\ \mathbf{elif}\;b \leq 5.4 \cdot 10^{-129}:\\ \;\;\;\;\left(x + a\right) - y \cdot z\\ \mathbf{elif}\;b \leq 2.25 \cdot 10^{+61}:\\ \;\;\;\;x - a \cdot \left(t + -1\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]

Alternative 15: 21.0% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;x \leq -1.32 \cdot 10^{-99}:\\
\;\;\;\;a\\

\mathbf{elif}\;x \leq -1.45 \cdot 10^{-289}:\\
\;\;\;\;z\\

\mathbf{elif}\;x \leq 1.7 \cdot 10^{-158}:\\
\;\;\;\;a\\

\mathbf{elif}\;x \leq 2.1 \cdot 10^{-6}:\\
\;\;\;\;z\\

\mathbf{elif}\;x \leq 8 \cdot 10^{+69}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.5500000000000001e103 or 8.0000000000000006e69 < x

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

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

    if -2.5500000000000001e103 < x < -1.31999999999999999e-99 or -1.45000000000000003e-289 < x < 1.7e-158 or 2.0999999999999998e-6 < x < 8.0000000000000006e69

    1. Initial program 96.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 45.1%

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

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

    if -1.31999999999999999e-99 < x < -1.45000000000000003e-289 or 1.7e-158 < x < 2.0999999999999998e-6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.55 \cdot 10^{+103}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.32 \cdot 10^{-99}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq -1.45 \cdot 10^{-289}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{-158}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{-6}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 8 \cdot 10^{+69}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 16: 20.5% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{+103}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.22 \cdot 10^{-101}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq -2.1 \cdot 10^{-289}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{-145}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 0.057:\\ \;\;\;\;-2 \cdot b\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{+72}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= x -2.1e+103)
   x
   (if (<= x -1.22e-101)
     a
     (if (<= x -2.1e-289)
       z
       (if (<= x 2.4e-145)
         a
         (if (<= x 0.057) (* -2.0 b) (if (<= x 3.5e+72) a x)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -2.1e+103) {
		tmp = x;
	} else if (x <= -1.22e-101) {
		tmp = a;
	} else if (x <= -2.1e-289) {
		tmp = z;
	} else if (x <= 2.4e-145) {
		tmp = a;
	} else if (x <= 0.057) {
		tmp = -2.0 * b;
	} else if (x <= 3.5e+72) {
		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 <= (-2.1d+103)) then
        tmp = x
    else if (x <= (-1.22d-101)) then
        tmp = a
    else if (x <= (-2.1d-289)) then
        tmp = z
    else if (x <= 2.4d-145) then
        tmp = a
    else if (x <= 0.057d0) then
        tmp = (-2.0d0) * b
    else if (x <= 3.5d+72) 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 <= -2.1e+103) {
		tmp = x;
	} else if (x <= -1.22e-101) {
		tmp = a;
	} else if (x <= -2.1e-289) {
		tmp = z;
	} else if (x <= 2.4e-145) {
		tmp = a;
	} else if (x <= 0.057) {
		tmp = -2.0 * b;
	} else if (x <= 3.5e+72) {
		tmp = a;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if x <= -2.1e+103:
		tmp = x
	elif x <= -1.22e-101:
		tmp = a
	elif x <= -2.1e-289:
		tmp = z
	elif x <= 2.4e-145:
		tmp = a
	elif x <= 0.057:
		tmp = -2.0 * b
	elif x <= 3.5e+72:
		tmp = a
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -2.1e+103)
		tmp = x;
	elseif (x <= -1.22e-101)
		tmp = a;
	elseif (x <= -2.1e-289)
		tmp = z;
	elseif (x <= 2.4e-145)
		tmp = a;
	elseif (x <= 0.057)
		tmp = Float64(-2.0 * b);
	elseif (x <= 3.5e+72)
		tmp = a;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (x <= -2.1e+103)
		tmp = x;
	elseif (x <= -1.22e-101)
		tmp = a;
	elseif (x <= -2.1e-289)
		tmp = z;
	elseif (x <= 2.4e-145)
		tmp = a;
	elseif (x <= 0.057)
		tmp = -2.0 * b;
	elseif (x <= 3.5e+72)
		tmp = a;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.1e+103], x, If[LessEqual[x, -1.22e-101], a, If[LessEqual[x, -2.1e-289], z, If[LessEqual[x, 2.4e-145], a, If[LessEqual[x, 0.057], N[(-2.0 * b), $MachinePrecision], If[LessEqual[x, 3.5e+72], a, x]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -1.22 \cdot 10^{-101}:\\
\;\;\;\;a\\

\mathbf{elif}\;x \leq -2.1 \cdot 10^{-289}:\\
\;\;\;\;z\\

\mathbf{elif}\;x \leq 2.4 \cdot 10^{-145}:\\
\;\;\;\;a\\

\mathbf{elif}\;x \leq 0.057:\\
\;\;\;\;-2 \cdot b\\

\mathbf{elif}\;x \leq 3.5 \cdot 10^{+72}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.1000000000000002e103 or 3.5000000000000001e72 < x

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

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

    if -2.1000000000000002e103 < x < -1.2199999999999999e-101 or -2.0999999999999998e-289 < x < 2.40000000000000015e-145 or 0.0570000000000000021 < x < 3.5000000000000001e72

    1. Initial program 96.4%

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

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

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

    if -1.2199999999999999e-101 < x < -2.0999999999999998e-289

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.40000000000000015e-145 < x < 0.0570000000000000021

    1. Initial program 96.7%

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

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

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

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

        \[\leadsto \color{blue}{b \cdot -2} \]
    6. Simplified22.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{+103}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.22 \cdot 10^{-101}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq -2.1 \cdot 10^{-289}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{-145}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 0.057:\\ \;\;\;\;-2 \cdot b\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{+72}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 17: 25.7% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;t \leq 1.06 \cdot 10^{-293}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 2.45 \cdot 10^{-239}:\\
\;\;\;\;a\\

\mathbf{elif}\;t \leq 8.2 \cdot 10^{-152}:\\
\;\;\;\;z\\

\mathbf{elif}\;t \leq 64000000:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.79999999999999989e56 or 6.4e7 < t

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.79999999999999989e56 < t < 1.05999999999999994e-293

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

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

    if 1.05999999999999994e-293 < t < 2.45000000000000016e-239 or 8.2000000000000002e-152 < t < 6.4e7

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

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

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

    if 2.45000000000000016e-239 < t < 8.2000000000000002e-152

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.8 \cdot 10^{+56}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 1.06 \cdot 10^{-293}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.45 \cdot 10^{-239}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{-152}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 64000000:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 18: 32.4% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;y \leq 7.2 \cdot 10^{-201}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 1.6 \cdot 10^{-153}:\\
\;\;\;\;z\\

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

\mathbf{elif}\;y \leq 5.4 \cdot 10^{+71}:\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -9.5999999999999996e117 or 5.39999999999999993e71 < y

    1. Initial program 92.0%

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

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

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

        \[\leadsto \color{blue}{y \cdot b} \]
    5. Simplified50.4%

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

    if -9.5999999999999996e117 < y < 7.20000000000000063e-201 or 1.6e-153 < y < 1.89999999999999988e-29

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

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

    if 7.20000000000000063e-201 < y < 1.6e-153

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.89999999999999988e-29 < y < 5.39999999999999993e71

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

        \[\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-def95.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+95.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-neg95.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-eval95.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-neg95.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-95.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-neg95.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-neg95.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-eval95.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-neg95.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-neg95.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-eval95.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. Simplified95.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 t around 0 91.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.6 \cdot 10^{+117}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{-201}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{-153}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-29}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{+71}:\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 19: 24.6% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;b \leq -1.9 \cdot 10^{-55}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;b \leq 1.18 \cdot 10^{-39}:\\
\;\;\;\;x\\

\mathbf{elif}\;b \leq 2.9 \cdot 10^{+55}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -6.99999999999999987e80 or 2.8999999999999999e55 < b

    1. Initial program 90.7%

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

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

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

        \[\leadsto \color{blue}{y \cdot b} \]
    5. Simplified44.4%

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

    if -6.99999999999999987e80 < b < -1.8999999999999998e-55

    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. Step-by-step derivation
      1. +-commutative99.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-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 t around 0 90.3%

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

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

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

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

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

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

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

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

    if -1.8999999999999998e-55 < b < 1.17999999999999993e-39

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

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

    if 1.17999999999999993e-39 < b < 2.8999999999999999e55

    1. Initial program 95.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7 \cdot 10^{+80}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq -1.9 \cdot 10^{-55}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq 1.18 \cdot 10^{-39}:\\ \;\;\;\;x\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{+55}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 20: 55.7% accurate, 1.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.75e56 or 9e9 < t

    1. Initial program 95.1%

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

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

    if -1.75e56 < t < 2.80000000000000023e-112

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.80000000000000023e-112 < t < 9e9

    1. Initial program 90.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.75 \cdot 10^{+56}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-112}:\\ \;\;\;\;a + \left(x + z\right)\\ \mathbf{elif}\;t \leq 9000000000:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 21: 61.5% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.00095 \lor \neg \left(b \leq 7 \cdot 10^{+60}\right):\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\

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


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

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

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

    if -9.49999999999999998e-4 < b < 7.0000000000000004e60

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

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

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

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

Alternative 22: 40.0% accurate, 2.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.55 \cdot 10^{+69} \lor \neg \left(b \leq 6.2 \cdot 10^{+41}\right):\\
\;\;\;\;b \cdot \left(y - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.54999999999999999e69 or 6.2e41 < b

    1. Initial program 91.6%

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

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

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

    if -2.54999999999999999e69 < b < 6.2e41

    1. Initial program 99.3%

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

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

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

Alternative 23: 32.7% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.4 \cdot 10^{+74} \lor \neg \left(b \leq 3.3 \cdot 10^{+61}\right):\\
\;\;\;\;y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.4000000000000002e74 or 3.2999999999999998e61 < b

    1. Initial program 91.2%

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

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

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

        \[\leadsto \color{blue}{y \cdot b} \]
    5. Simplified44.3%

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

    if -4.4000000000000002e74 < b < 3.2999999999999998e61

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.4 \cdot 10^{+74} \lor \neg \left(b \leq 3.3 \cdot 10^{+61}\right):\\ \;\;\;\;y \cdot b\\ \mathbf{else}:\\ \;\;\;\;x + a\\ \end{array} \]

Alternative 24: 21.0% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;x \leq 9.6 \cdot 10^{+67}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.5e103 or 9.60000000000000007e67 < x

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

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

    if -1.5e103 < x < 9.60000000000000007e67

    1. Initial program 95.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.5 \cdot 10^{+103}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 9.6 \cdot 10^{+67}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 25: 11.0% accurate, 21.0× speedup?

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

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

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

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

    \[\leadsto a \]

Reproduce

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