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

Percentage Accurate: 95.3% → 97.6%
Time: 20.5s
Alternatives: 22
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 22 alternatives:

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

Initial Program: 95.3% accurate, 1.0× speedup?

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

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

Alternative 1: 97.6% accurate, 0.5× speedup?

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

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

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


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

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

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

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

Alternative 2: 97.5% accurate, 0.1× speedup?

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

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

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

      \[\leadsto \color{blue}{\left(\left(y + t\right) - 2\right) \cdot b + \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right)} \]
    2. fma-def97.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+97.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-neg97.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-eval97.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-neg97.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-97.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-neg97.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-neg97.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-eval97.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-neg97.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-neg97.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-eval97.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. Simplified97.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. Final simplification97.2%

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

Alternative 3: 58.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + b \cdot \left(\left(y + t\right) - 2\right)\\ t_2 := x + \left(a - t \cdot a\right)\\ t_3 := z \cdot \left(1 - y\right)\\ \mathbf{if}\;b \leq -1.36 \cdot 10^{+75}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -4.7 \cdot 10^{-92}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -4.2 \cdot 10^{-205}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq -1.82 \cdot 10^{-234}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -2.5 \cdot 10^{-269}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 3.35 \cdot 10^{-186}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 1.26 \cdot 10^{-85} \lor \neg \left(b \leq 1.46 \cdot 10^{+40}\right) \land b \leq 6 \cdot 10^{+85}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* b (- (+ y t) 2.0))))
        (t_2 (+ x (- a (* t a))))
        (t_3 (* z (- 1.0 y))))
   (if (<= b -1.36e+75)
     t_1
     (if (<= b -4.7e-92)
       t_2
       (if (<= b -4.2e-205)
         (- x (* y z))
         (if (<= b -1.82e-234)
           t_2
           (if (<= b -2.5e-269)
             t_3
             (if (<= b 3.35e-186)
               t_2
               (if (or (<= b 1.26e-85)
                       (and (not (<= b 1.46e+40)) (<= b 6e+85)))
                 t_3
                 t_1)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (b * ((y + t) - 2.0));
	double t_2 = x + (a - (t * a));
	double t_3 = z * (1.0 - y);
	double tmp;
	if (b <= -1.36e+75) {
		tmp = t_1;
	} else if (b <= -4.7e-92) {
		tmp = t_2;
	} else if (b <= -4.2e-205) {
		tmp = x - (y * z);
	} else if (b <= -1.82e-234) {
		tmp = t_2;
	} else if (b <= -2.5e-269) {
		tmp = t_3;
	} else if (b <= 3.35e-186) {
		tmp = t_2;
	} else if ((b <= 1.26e-85) || (!(b <= 1.46e+40) && (b <= 6e+85))) {
		tmp = t_3;
	} 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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x + (b * ((y + t) - 2.0d0))
    t_2 = x + (a - (t * a))
    t_3 = z * (1.0d0 - y)
    if (b <= (-1.36d+75)) then
        tmp = t_1
    else if (b <= (-4.7d-92)) then
        tmp = t_2
    else if (b <= (-4.2d-205)) then
        tmp = x - (y * z)
    else if (b <= (-1.82d-234)) then
        tmp = t_2
    else if (b <= (-2.5d-269)) then
        tmp = t_3
    else if (b <= 3.35d-186) then
        tmp = t_2
    else if ((b <= 1.26d-85) .or. (.not. (b <= 1.46d+40)) .and. (b <= 6d+85)) then
        tmp = t_3
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (b * ((y + t) - 2.0));
	double t_2 = x + (a - (t * a));
	double t_3 = z * (1.0 - y);
	double tmp;
	if (b <= -1.36e+75) {
		tmp = t_1;
	} else if (b <= -4.7e-92) {
		tmp = t_2;
	} else if (b <= -4.2e-205) {
		tmp = x - (y * z);
	} else if (b <= -1.82e-234) {
		tmp = t_2;
	} else if (b <= -2.5e-269) {
		tmp = t_3;
	} else if (b <= 3.35e-186) {
		tmp = t_2;
	} else if ((b <= 1.26e-85) || (!(b <= 1.46e+40) && (b <= 6e+85))) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (b * ((y + t) - 2.0))
	t_2 = x + (a - (t * a))
	t_3 = z * (1.0 - y)
	tmp = 0
	if b <= -1.36e+75:
		tmp = t_1
	elif b <= -4.7e-92:
		tmp = t_2
	elif b <= -4.2e-205:
		tmp = x - (y * z)
	elif b <= -1.82e-234:
		tmp = t_2
	elif b <= -2.5e-269:
		tmp = t_3
	elif b <= 3.35e-186:
		tmp = t_2
	elif (b <= 1.26e-85) or (not (b <= 1.46e+40) and (b <= 6e+85)):
		tmp = t_3
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0)))
	t_2 = Float64(x + Float64(a - Float64(t * a)))
	t_3 = Float64(z * Float64(1.0 - y))
	tmp = 0.0
	if (b <= -1.36e+75)
		tmp = t_1;
	elseif (b <= -4.7e-92)
		tmp = t_2;
	elseif (b <= -4.2e-205)
		tmp = Float64(x - Float64(y * z));
	elseif (b <= -1.82e-234)
		tmp = t_2;
	elseif (b <= -2.5e-269)
		tmp = t_3;
	elseif (b <= 3.35e-186)
		tmp = t_2;
	elseif ((b <= 1.26e-85) || (!(b <= 1.46e+40) && (b <= 6e+85)))
		tmp = t_3;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (b * ((y + t) - 2.0));
	t_2 = x + (a - (t * a));
	t_3 = z * (1.0 - y);
	tmp = 0.0;
	if (b <= -1.36e+75)
		tmp = t_1;
	elseif (b <= -4.7e-92)
		tmp = t_2;
	elseif (b <= -4.2e-205)
		tmp = x - (y * z);
	elseif (b <= -1.82e-234)
		tmp = t_2;
	elseif (b <= -2.5e-269)
		tmp = t_3;
	elseif (b <= 3.35e-186)
		tmp = t_2;
	elseif ((b <= 1.26e-85) || (~((b <= 1.46e+40)) && (b <= 6e+85)))
		tmp = t_3;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.36e+75], t$95$1, If[LessEqual[b, -4.7e-92], t$95$2, If[LessEqual[b, -4.2e-205], N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.82e-234], t$95$2, If[LessEqual[b, -2.5e-269], t$95$3, If[LessEqual[b, 3.35e-186], t$95$2, If[Or[LessEqual[b, 1.26e-85], And[N[Not[LessEqual[b, 1.46e+40]], $MachinePrecision], LessEqual[b, 6e+85]]], t$95$3, t$95$1]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -4.7 \cdot 10^{-92}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;b \leq -1.82 \cdot 10^{-234}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq -2.5 \cdot 10^{-269}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 3.35 \cdot 10^{-186}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 1.26 \cdot 10^{-85} \lor \neg \left(b \leq 1.46 \cdot 10^{+40}\right) \land b \leq 6 \cdot 10^{+85}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.36e75 or 1.26e-85 < b < 1.46e40 or 6.0000000000000001e85 < 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 a around 0 87.1%

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

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

    if -1.36e75 < b < -4.69999999999999993e-92 or -4.19999999999999965e-205 < b < -1.8200000000000001e-234 or -2.49999999999999989e-269 < b < 3.35000000000000017e-186

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto x - a \cdot \left(t + \color{blue}{-1}\right) \]
      3. distribute-rgt-in70.6%

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

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

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

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

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

    if -4.69999999999999993e-92 < b < -4.19999999999999965e-205

    1. Initial program 100.0%

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

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

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

    if -1.8200000000000001e-234 < b < -2.49999999999999989e-269 or 3.35000000000000017e-186 < b < 1.26e-85 or 1.46e40 < b < 6.0000000000000001e85

    1. Initial program 97.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.36 \cdot 10^{+75}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -4.7 \cdot 10^{-92}:\\ \;\;\;\;x + \left(a - t \cdot a\right)\\ \mathbf{elif}\;b \leq -4.2 \cdot 10^{-205}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq -1.82 \cdot 10^{-234}:\\ \;\;\;\;x + \left(a - t \cdot a\right)\\ \mathbf{elif}\;b \leq -2.5 \cdot 10^{-269}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 3.35 \cdot 10^{-186}:\\ \;\;\;\;x + \left(a - t \cdot a\right)\\ \mathbf{elif}\;b \leq 1.26 \cdot 10^{-85} \lor \neg \left(b \leq 1.46 \cdot 10^{+40}\right) \land b \leq 6 \cdot 10^{+85}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]

Alternative 4: 50.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;b \leq -0.0095:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq -7 \cdot 10^{-53}:\\
\;\;\;\;t_4\\

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

\mathbf{elif}\;b \leq 2.8 \cdot 10^{-306}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 1.65 \cdot 10^{-85}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 4 \cdot 10^{-7}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;b \leq 1.8 \cdot 10^{+87}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if b < -2.9000000000000001e123 or 1.79999999999999997e87 < 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.6%

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

    if -2.9000000000000001e123 < b < -0.00949999999999999976 or -1.99999999999999999e-90 < b < 2.8000000000000001e-306

    1. Initial program 100.0%

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

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

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

    if -0.00949999999999999976 < b < -6.99999999999999987e-53 or 1.64999999999999986e-85 < b < 3.9999999999999998e-7

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

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

    if -6.99999999999999987e-53 < b < -1.99999999999999999e-90

    1. Initial program 100.0%

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

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

    if 2.8000000000000001e-306 < b < 1.79999999999999992e-248

    1. Initial program 100.0%

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

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

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

    if 1.79999999999999992e-248 < b < 1.64999999999999986e-85 or 3.9999999999999998e-7 < b < 1.79999999999999997e87

    1. Initial program 98.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.9 \cdot 10^{+123}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -0.0095:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq -7 \cdot 10^{-53}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq -2 \cdot 10^{-90}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{-306}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq 1.8 \cdot 10^{-248}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;b \leq 1.65 \cdot 10^{-85}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 4 \cdot 10^{-7}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq 1.8 \cdot 10^{+87}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]

Alternative 5: 55.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(a - t \cdot a\right)\\ t_2 := z \cdot \left(1 - y\right)\\ t_3 := b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;b \leq -1.4 \cdot 10^{+103}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq -3.4 \cdot 10^{-91}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -3.1 \cdot 10^{-204}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq -5.3 \cdot 10^{-236}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -5.2 \cdot 10^{-274}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 3.35 \cdot 10^{-186}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 5 \cdot 10^{-81}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{+44}:\\ \;\;\;\;x + b \cdot \left(t - 2\right)\\ \mathbf{elif}\;b \leq 6 \cdot 10^{+85}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (- a (* t a))))
        (t_2 (* z (- 1.0 y)))
        (t_3 (* b (- (+ y t) 2.0))))
   (if (<= b -1.4e+103)
     t_3
     (if (<= b -3.4e-91)
       t_1
       (if (<= b -3.1e-204)
         (- x (* y z))
         (if (<= b -5.3e-236)
           t_1
           (if (<= b -5.2e-274)
             t_2
             (if (<= b 3.35e-186)
               t_1
               (if (<= b 5e-81)
                 t_2
                 (if (<= b 5.8e+44)
                   (+ x (* b (- t 2.0)))
                   (if (<= b 6e+85) t_2 t_3)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (a - (t * a));
	double t_2 = z * (1.0 - y);
	double t_3 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -1.4e+103) {
		tmp = t_3;
	} else if (b <= -3.4e-91) {
		tmp = t_1;
	} else if (b <= -3.1e-204) {
		tmp = x - (y * z);
	} else if (b <= -5.3e-236) {
		tmp = t_1;
	} else if (b <= -5.2e-274) {
		tmp = t_2;
	} else if (b <= 3.35e-186) {
		tmp = t_1;
	} else if (b <= 5e-81) {
		tmp = t_2;
	} else if (b <= 5.8e+44) {
		tmp = x + (b * (t - 2.0));
	} else if (b <= 6e+85) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x + (a - (t * a))
    t_2 = z * (1.0d0 - y)
    t_3 = b * ((y + t) - 2.0d0)
    if (b <= (-1.4d+103)) then
        tmp = t_3
    else if (b <= (-3.4d-91)) then
        tmp = t_1
    else if (b <= (-3.1d-204)) then
        tmp = x - (y * z)
    else if (b <= (-5.3d-236)) then
        tmp = t_1
    else if (b <= (-5.2d-274)) then
        tmp = t_2
    else if (b <= 3.35d-186) then
        tmp = t_1
    else if (b <= 5d-81) then
        tmp = t_2
    else if (b <= 5.8d+44) then
        tmp = x + (b * (t - 2.0d0))
    else if (b <= 6d+85) then
        tmp = t_2
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (a - (t * a));
	double t_2 = z * (1.0 - y);
	double t_3 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -1.4e+103) {
		tmp = t_3;
	} else if (b <= -3.4e-91) {
		tmp = t_1;
	} else if (b <= -3.1e-204) {
		tmp = x - (y * z);
	} else if (b <= -5.3e-236) {
		tmp = t_1;
	} else if (b <= -5.2e-274) {
		tmp = t_2;
	} else if (b <= 3.35e-186) {
		tmp = t_1;
	} else if (b <= 5e-81) {
		tmp = t_2;
	} else if (b <= 5.8e+44) {
		tmp = x + (b * (t - 2.0));
	} else if (b <= 6e+85) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (a - (t * a))
	t_2 = z * (1.0 - y)
	t_3 = b * ((y + t) - 2.0)
	tmp = 0
	if b <= -1.4e+103:
		tmp = t_3
	elif b <= -3.4e-91:
		tmp = t_1
	elif b <= -3.1e-204:
		tmp = x - (y * z)
	elif b <= -5.3e-236:
		tmp = t_1
	elif b <= -5.2e-274:
		tmp = t_2
	elif b <= 3.35e-186:
		tmp = t_1
	elif b <= 5e-81:
		tmp = t_2
	elif b <= 5.8e+44:
		tmp = x + (b * (t - 2.0))
	elif b <= 6e+85:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(a - Float64(t * a)))
	t_2 = Float64(z * Float64(1.0 - y))
	t_3 = Float64(b * Float64(Float64(y + t) - 2.0))
	tmp = 0.0
	if (b <= -1.4e+103)
		tmp = t_3;
	elseif (b <= -3.4e-91)
		tmp = t_1;
	elseif (b <= -3.1e-204)
		tmp = Float64(x - Float64(y * z));
	elseif (b <= -5.3e-236)
		tmp = t_1;
	elseif (b <= -5.2e-274)
		tmp = t_2;
	elseif (b <= 3.35e-186)
		tmp = t_1;
	elseif (b <= 5e-81)
		tmp = t_2;
	elseif (b <= 5.8e+44)
		tmp = Float64(x + Float64(b * Float64(t - 2.0)));
	elseif (b <= 6e+85)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (a - (t * a));
	t_2 = z * (1.0 - y);
	t_3 = b * ((y + t) - 2.0);
	tmp = 0.0;
	if (b <= -1.4e+103)
		tmp = t_3;
	elseif (b <= -3.4e-91)
		tmp = t_1;
	elseif (b <= -3.1e-204)
		tmp = x - (y * z);
	elseif (b <= -5.3e-236)
		tmp = t_1;
	elseif (b <= -5.2e-274)
		tmp = t_2;
	elseif (b <= 3.35e-186)
		tmp = t_1;
	elseif (b <= 5e-81)
		tmp = t_2;
	elseif (b <= 5.8e+44)
		tmp = x + (b * (t - 2.0));
	elseif (b <= 6e+85)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.4e+103], t$95$3, If[LessEqual[b, -3.4e-91], t$95$1, If[LessEqual[b, -3.1e-204], N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -5.3e-236], t$95$1, If[LessEqual[b, -5.2e-274], t$95$2, If[LessEqual[b, 3.35e-186], t$95$1, If[LessEqual[b, 5e-81], t$95$2, If[LessEqual[b, 5.8e+44], N[(x + N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6e+85], t$95$2, t$95$3]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -3.4 \cdot 10^{-91}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq -5.3 \cdot 10^{-236}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq -5.2 \cdot 10^{-274}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 3.35 \cdot 10^{-186}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 5 \cdot 10^{-81}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;b \leq 6 \cdot 10^{+85}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -1.40000000000000004e103 or 6.0000000000000001e85 < b

    1. Initial program 91.1%

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

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

    if -1.40000000000000004e103 < b < -3.40000000000000027e-91 or -3.0999999999999999e-204 < b < -5.3000000000000002e-236 or -5.2e-274 < b < 3.35000000000000017e-186

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

    if -3.40000000000000027e-91 < b < -3.0999999999999999e-204

    1. Initial program 100.0%

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

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

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

    if -5.3000000000000002e-236 < b < -5.2e-274 or 3.35000000000000017e-186 < b < 4.99999999999999981e-81 or 5.8000000000000004e44 < b < 6.0000000000000001e85

    1. Initial program 97.5%

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

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

    if 4.99999999999999981e-81 < b < 5.8000000000000004e44

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.4 \cdot 10^{+103}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -3.4 \cdot 10^{-91}:\\ \;\;\;\;x + \left(a - t \cdot a\right)\\ \mathbf{elif}\;b \leq -3.1 \cdot 10^{-204}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq -5.3 \cdot 10^{-236}:\\ \;\;\;\;x + \left(a - t \cdot a\right)\\ \mathbf{elif}\;b \leq -5.2 \cdot 10^{-274}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 3.35 \cdot 10^{-186}:\\ \;\;\;\;x + \left(a - t \cdot a\right)\\ \mathbf{elif}\;b \leq 5 \cdot 10^{-81}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{+44}:\\ \;\;\;\;x + b \cdot \left(t - 2\right)\\ \mathbf{elif}\;b \leq 6 \cdot 10^{+85}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]

Alternative 6: 69.0% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;b \leq 4.9 \cdot 10^{-53}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 5.5 \cdot 10^{+34}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 3.2 \cdot 10^{+56}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.72e75 or 4.89999999999999963e-53 < b < 5.4999999999999996e34 or 1.14999999999999992e104 < b

    1. Initial program 93.3%

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

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

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

    if -1.72e75 < b < 4.89999999999999963e-53 or 5.4999999999999996e34 < b < 3.20000000000000003e56

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.20000000000000003e56 < b < 1.19999999999999991e91

    1. Initial program 88.9%

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

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

    if 1.19999999999999991e91 < b < 1.14999999999999992e104

    1. Initial program 75.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.72 \cdot 10^{+75}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 4.9 \cdot 10^{-53}:\\ \;\;\;\;x + \left(z + \left(a - t \cdot a\right)\right)\\ \mathbf{elif}\;b \leq 5.5 \cdot 10^{+34}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 3.2 \cdot 10^{+56}:\\ \;\;\;\;x + \left(z + \left(a - t \cdot a\right)\right)\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{+91}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{+104}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]

Alternative 7: 49.9% accurate, 1.1× 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}\;y \leq -9 \cdot 10^{+25}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1 \cdot 10^{-79}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{-255}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-289}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-296}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;y \leq 1.42 \cdot 10^{-247}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{+73}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \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 (<= y -9e+25)
     t_1
     (if (<= y -1e-79)
       (* b (- t 2.0))
       (if (<= y -4.6e-255)
         (* a (- 1.0 t))
         (if (<= y -3.2e-289)
           t_2
           (if (<= y 9.5e-296)
             (* z (- 1.0 y))
             (if (<= y 1.42e-247)
               (- x (* t a))
               (if (<= y 3.7e+73) t_2 t_1)))))))))
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 (y <= -9e+25) {
		tmp = t_1;
	} else if (y <= -1e-79) {
		tmp = b * (t - 2.0);
	} else if (y <= -4.6e-255) {
		tmp = a * (1.0 - t);
	} else if (y <= -3.2e-289) {
		tmp = t_2;
	} else if (y <= 9.5e-296) {
		tmp = z * (1.0 - y);
	} else if (y <= 1.42e-247) {
		tmp = x - (t * a);
	} else if (y <= 3.7e+73) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = y * (b - z)
    t_2 = t * (b - a)
    if (y <= (-9d+25)) then
        tmp = t_1
    else if (y <= (-1d-79)) then
        tmp = b * (t - 2.0d0)
    else if (y <= (-4.6d-255)) then
        tmp = a * (1.0d0 - t)
    else if (y <= (-3.2d-289)) then
        tmp = t_2
    else if (y <= 9.5d-296) then
        tmp = z * (1.0d0 - y)
    else if (y <= 1.42d-247) then
        tmp = x - (t * a)
    else if (y <= 3.7d+73) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (y <= -9e+25) {
		tmp = t_1;
	} else if (y <= -1e-79) {
		tmp = b * (t - 2.0);
	} else if (y <= -4.6e-255) {
		tmp = a * (1.0 - t);
	} else if (y <= -3.2e-289) {
		tmp = t_2;
	} else if (y <= 9.5e-296) {
		tmp = z * (1.0 - y);
	} else if (y <= 1.42e-247) {
		tmp = x - (t * a);
	} else if (y <= 3.7e+73) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	t_2 = t * (b - a)
	tmp = 0
	if y <= -9e+25:
		tmp = t_1
	elif y <= -1e-79:
		tmp = b * (t - 2.0)
	elif y <= -4.6e-255:
		tmp = a * (1.0 - t)
	elif y <= -3.2e-289:
		tmp = t_2
	elif y <= 9.5e-296:
		tmp = z * (1.0 - y)
	elif y <= 1.42e-247:
		tmp = x - (t * a)
	elif y <= 3.7e+73:
		tmp = t_2
	else:
		tmp = t_1
	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 (y <= -9e+25)
		tmp = t_1;
	elseif (y <= -1e-79)
		tmp = Float64(b * Float64(t - 2.0));
	elseif (y <= -4.6e-255)
		tmp = Float64(a * Float64(1.0 - t));
	elseif (y <= -3.2e-289)
		tmp = t_2;
	elseif (y <= 9.5e-296)
		tmp = Float64(z * Float64(1.0 - y));
	elseif (y <= 1.42e-247)
		tmp = Float64(x - Float64(t * a));
	elseif (y <= 3.7e+73)
		tmp = t_2;
	else
		tmp = t_1;
	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 (y <= -9e+25)
		tmp = t_1;
	elseif (y <= -1e-79)
		tmp = b * (t - 2.0);
	elseif (y <= -4.6e-255)
		tmp = a * (1.0 - t);
	elseif (y <= -3.2e-289)
		tmp = t_2;
	elseif (y <= 9.5e-296)
		tmp = z * (1.0 - y);
	elseif (y <= 1.42e-247)
		tmp = x - (t * a);
	elseif (y <= 3.7e+73)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e+25], t$95$1, If[LessEqual[y, -1e-79], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.6e-255], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.2e-289], t$95$2, If[LessEqual[y, 9.5e-296], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.42e-247], N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e+73], t$95$2, t$95$1]]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;y \leq -3.2 \cdot 10^{-289}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;y \leq 1.42 \cdot 10^{-247}:\\
\;\;\;\;x - t \cdot a\\

\mathbf{elif}\;y \leq 3.7 \cdot 10^{+73}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -9.0000000000000006e25 or 3.69999999999999973e73 < y

    1. Initial program 93.7%

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

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

    if -9.0000000000000006e25 < y < -1e-79

    1. Initial program 100.0%

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

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

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

    if -1e-79 < y < -4.5999999999999997e-255

    1. Initial program 97.4%

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

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

    if -4.5999999999999997e-255 < y < -3.2000000000000002e-289 or 1.42000000000000001e-247 < y < 3.69999999999999973e73

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

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

    if -3.2000000000000002e-289 < y < 9.50000000000000046e-296

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

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

    if 9.50000000000000046e-296 < y < 1.42000000000000001e-247

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9 \cdot 10^{+25}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1 \cdot 10^{-79}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{-255}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-289}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-296}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;y \leq 1.42 \cdot 10^{-247}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{+73}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 8: 85.5% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;b \leq -2.2 \cdot 10^{-50} \lor \neg \left(b \leq 2.5 \cdot 10^{-79}\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.1999999999999999e-50 or 2.5e-79 < b

    1. Initial program 93.8%

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

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

    if -2.1999999999999999e-50 < b < 2.5e-79

    1. Initial program 100.0%

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

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

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

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

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

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

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


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

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

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

    if -1.5e-52 < b < 2.3000000000000001e-53

    1. Initial program 100.0%

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

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

    if 2.3000000000000001e-53 < 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 a around 0 81.8%

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

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

Alternative 10: 48.8% 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}\;y \leq -1.15 \cdot 10^{+25}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{-87}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq -5.6 \cdot 10^{-254}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-289}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-234}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{+75}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \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 (<= y -1.15e+25)
     t_1
     (if (<= y -1.5e-87)
       (* b (- t 2.0))
       (if (<= y -5.6e-254)
         (* a (- 1.0 t))
         (if (<= y -7e-289)
           t_2
           (if (<= y 3.2e-234)
             (* z (- 1.0 y))
             (if (<= y 1.45e+75) t_2 t_1))))))))
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 (y <= -1.15e+25) {
		tmp = t_1;
	} else if (y <= -1.5e-87) {
		tmp = b * (t - 2.0);
	} else if (y <= -5.6e-254) {
		tmp = a * (1.0 - t);
	} else if (y <= -7e-289) {
		tmp = t_2;
	} else if (y <= 3.2e-234) {
		tmp = z * (1.0 - y);
	} else if (y <= 1.45e+75) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = y * (b - z)
    t_2 = t * (b - a)
    if (y <= (-1.15d+25)) then
        tmp = t_1
    else if (y <= (-1.5d-87)) then
        tmp = b * (t - 2.0d0)
    else if (y <= (-5.6d-254)) then
        tmp = a * (1.0d0 - t)
    else if (y <= (-7d-289)) then
        tmp = t_2
    else if (y <= 3.2d-234) then
        tmp = z * (1.0d0 - y)
    else if (y <= 1.45d+75) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (y <= -1.15e+25) {
		tmp = t_1;
	} else if (y <= -1.5e-87) {
		tmp = b * (t - 2.0);
	} else if (y <= -5.6e-254) {
		tmp = a * (1.0 - t);
	} else if (y <= -7e-289) {
		tmp = t_2;
	} else if (y <= 3.2e-234) {
		tmp = z * (1.0 - y);
	} else if (y <= 1.45e+75) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	t_2 = t * (b - a)
	tmp = 0
	if y <= -1.15e+25:
		tmp = t_1
	elif y <= -1.5e-87:
		tmp = b * (t - 2.0)
	elif y <= -5.6e-254:
		tmp = a * (1.0 - t)
	elif y <= -7e-289:
		tmp = t_2
	elif y <= 3.2e-234:
		tmp = z * (1.0 - y)
	elif y <= 1.45e+75:
		tmp = t_2
	else:
		tmp = t_1
	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 (y <= -1.15e+25)
		tmp = t_1;
	elseif (y <= -1.5e-87)
		tmp = Float64(b * Float64(t - 2.0));
	elseif (y <= -5.6e-254)
		tmp = Float64(a * Float64(1.0 - t));
	elseif (y <= -7e-289)
		tmp = t_2;
	elseif (y <= 3.2e-234)
		tmp = Float64(z * Float64(1.0 - y));
	elseif (y <= 1.45e+75)
		tmp = t_2;
	else
		tmp = t_1;
	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 (y <= -1.15e+25)
		tmp = t_1;
	elseif (y <= -1.5e-87)
		tmp = b * (t - 2.0);
	elseif (y <= -5.6e-254)
		tmp = a * (1.0 - t);
	elseif (y <= -7e-289)
		tmp = t_2;
	elseif (y <= 3.2e-234)
		tmp = z * (1.0 - y);
	elseif (y <= 1.45e+75)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.15e+25], t$95$1, If[LessEqual[y, -1.5e-87], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.6e-254], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7e-289], t$95$2, If[LessEqual[y, 3.2e-234], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e+75], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;y \leq -7 \cdot 10^{-289}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;y \leq 1.45 \cdot 10^{+75}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.1499999999999999e25 or 1.4499999999999999e75 < y

    1. Initial program 93.7%

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

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

    if -1.1499999999999999e25 < y < -1.50000000000000008e-87

    1. Initial program 100.0%

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

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

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

    if -1.50000000000000008e-87 < y < -5.59999999999999966e-254

    1. Initial program 97.4%

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

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

    if -5.59999999999999966e-254 < y < -6.9999999999999999e-289 or 3.1999999999999999e-234 < y < 1.4499999999999999e75

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

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

    if -6.9999999999999999e-289 < y < 3.1999999999999999e-234

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.15 \cdot 10^{+25}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{-87}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq -5.6 \cdot 10^{-254}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-289}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-234}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{+75}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 11: 82.9% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -3.19999999999999976e76 or 1.90000000000000003e129 < b

    1. Initial program 91.8%

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

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

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

    if -3.19999999999999976e76 < b < 1.90000000000000003e129

    1. Initial program 98.8%

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

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

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

Alternative 12: 39.7% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;a \leq -1.2 \cdot 10^{-159}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.4 \cdot 10^{-220}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 9.6 \cdot 10^{-37}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.68 \cdot 10^{+72}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.8499999999999999e-11 or 1.67999999999999991e72 < a

    1. Initial program 93.4%

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

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

    if -2.8499999999999999e-11 < a < -1.19999999999999999e-159 or 1.4e-220 < a < 9.59999999999999963e-37

    1. Initial program 96.9%

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

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

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

    if -1.19999999999999999e-159 < a < 1.4e-220 or 9.59999999999999963e-37 < a < 1.67999999999999991e72

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.85 \cdot 10^{-11}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-159}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-220}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;a \leq 9.6 \cdot 10^{-37}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;a \leq 1.68 \cdot 10^{+72}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]

Alternative 13: 55.7% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;y \leq -1.25 \cdot 10^{-228}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 2.5 \cdot 10^{+87}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.6999999999999999e31 or 2.4999999999999999e87 < y

    1. Initial program 93.4%

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

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

    if -1.6999999999999999e31 < y < -1.24999999999999993e-228 or -5.7999999999999996e-287 < y < 2.4999999999999999e87

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

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

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

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

    if -1.24999999999999993e-228 < y < -5.7999999999999996e-287

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+31}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.25 \cdot 10^{-228}:\\ \;\;\;\;x + b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{-287}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+87}:\\ \;\;\;\;x + b \cdot \left(t - 2\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 14: 47.4% accurate, 1.6× 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 -1.45 \cdot 10^{+48}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-269}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{-142}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 6000:\\ \;\;\;\;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 -1.45e+48)
     t_2
     (if (<= t 2.25e-269)
       t_1
       (if (<= t 1.55e-142) x (if (<= t 6000.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 <= -1.45e+48) {
		tmp = t_2;
	} else if (t <= 2.25e-269) {
		tmp = t_1;
	} else if (t <= 1.55e-142) {
		tmp = x;
	} else if (t <= 6000.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 <= (-1.45d+48)) then
        tmp = t_2
    else if (t <= 2.25d-269) then
        tmp = t_1
    else if (t <= 1.55d-142) then
        tmp = x
    else if (t <= 6000.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 <= -1.45e+48) {
		tmp = t_2;
	} else if (t <= 2.25e-269) {
		tmp = t_1;
	} else if (t <= 1.55e-142) {
		tmp = x;
	} else if (t <= 6000.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 <= -1.45e+48:
		tmp = t_2
	elif t <= 2.25e-269:
		tmp = t_1
	elif t <= 1.55e-142:
		tmp = x
	elif t <= 6000.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 <= -1.45e+48)
		tmp = t_2;
	elseif (t <= 2.25e-269)
		tmp = t_1;
	elseif (t <= 1.55e-142)
		tmp = x;
	elseif (t <= 6000.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 <= -1.45e+48)
		tmp = t_2;
	elseif (t <= 2.25e-269)
		tmp = t_1;
	elseif (t <= 1.55e-142)
		tmp = x;
	elseif (t <= 6000.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, -1.45e+48], t$95$2, If[LessEqual[t, 2.25e-269], t$95$1, If[LessEqual[t, 1.55e-142], x, If[LessEqual[t, 6000.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 -1.45 \cdot 10^{+48}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 2.25 \cdot 10^{-269}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.55 \cdot 10^{-142}:\\
\;\;\;\;x\\

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

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


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

    1. Initial program 94.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 t around inf 62.1%

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

    if -1.4499999999999999e48 < t < 2.2500000000000001e-269 or 1.55e-142 < t < 6e3

    1. Initial program 98.1%

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

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

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

    if 2.2500000000000001e-269 < t < 1.55e-142

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{+48}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-269}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{-142}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 6000:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 15: 50.3% accurate, 1.6× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.79999999999999967e25 or 3.3000000000000003e73 < y

    1. Initial program 93.7%

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

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

    if -6.79999999999999967e25 < y < -6.7999999999999995e-82

    1. Initial program 100.0%

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

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

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

    if -6.7999999999999995e-82 < y < -4.5e-254

    1. Initial program 97.4%

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

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

    if -4.5e-254 < y < 3.3000000000000003e73

    1. Initial program 98.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{+25}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -6.8 \cdot 10^{-82}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{-254}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{+73}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 16: 28.3% accurate, 2.1× speedup?

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

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

\mathbf{elif}\;t \leq -9.5 \cdot 10^{-140}:\\
\;\;\;\;a\\

\mathbf{elif}\;t \leq 1700:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.51999999999999992e-9 or 1700 < t

    1. Initial program 94.6%

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

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

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

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

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

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

    if -1.51999999999999992e-9 < t < -9.50000000000000019e-140

    1. Initial program 96.9%

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

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

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

    if -9.50000000000000019e-140 < t < 1700

    1. Initial program 98.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.52 \cdot 10^{-9}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;t \leq -9.5 \cdot 10^{-140}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 1700:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \end{array} \]

Alternative 17: 26.4% accurate, 2.3× speedup?

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

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

\mathbf{elif}\;t \leq -2 \cdot 10^{-139}:\\
\;\;\;\;a\\

\mathbf{elif}\;t \leq 2.35 \cdot 10^{+28}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.0000000000000004e68 or 2.34999999999999983e28 < t

    1. Initial program 93.8%

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

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

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

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

        \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - {\left(\sqrt[3]{\left(t + \color{blue}{-1}\right) \cdot a}\right)}^{3}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Applied egg-rr93.6%

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

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

        \[\leadsto \color{blue}{t \cdot b} \]
    6. Simplified35.3%

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

    if -5.0000000000000004e68 < t < -2.00000000000000006e-139

    1. Initial program 97.6%

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

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

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

    if -2.00000000000000006e-139 < t < 2.34999999999999983e28

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{+68}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -2 \cdot 10^{-139}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 18: 40.1% accurate, 2.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{-9} \lor \neg \left(a \leq 8.4 \cdot 10^{+71}\right):\\
\;\;\;\;a \cdot \left(1 - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.5000000000000001e-9 or 8.39999999999999957e71 < a

    1. Initial program 93.2%

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

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

    if -2.5000000000000001e-9 < a < 8.39999999999999957e71

    1. Initial program 98.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{-9} \lor \neg \left(a \leq 8.4 \cdot 10^{+71}\right):\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \end{array} \]

Alternative 19: 34.7% accurate, 2.3× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.6000000000000002e125 or 1.22e160 < y

    1. Initial program 93.1%

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

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

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

    if -5.6000000000000002e125 < y < 1.22e160

    1. Initial program 97.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.6 \cdot 10^{+125}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 1.22 \cdot 10^{+160}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 20: 25.1% accurate, 2.9× speedup?

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

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

\mathbf{elif}\;b \leq 51:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -6.0000000000000002e171 or 51 < b

    1. Initial program 90.1%

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

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

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

    if -6.0000000000000002e171 < b < 51

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6 \cdot 10^{+171}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq 51:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 21: 21.1% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;x \leq 1.7 \cdot 10^{+52}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.55e54 or 1.7e52 < x

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

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

    if -1.55e54 < x < 1.7e52

    1. Initial program 96.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.55 \cdot 10^{+54}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{+52}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 22: 10.5% accurate, 21.0× speedup?

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

\\
a
\end{array}
Derivation
  1. Initial program 96.5%

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

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

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

    \[\leadsto a \]

Reproduce

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