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

Percentage Accurate: 94.8% → 97.2%
Time: 18.8s
Alternatives: 23
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 23 alternatives:

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

Initial Program: 94.8% 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.2% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 1.62 \cdot 10^{+212}:\\ \;\;\;\;\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= b 1.62e+212)
   (fma (+ y (+ t -2.0)) b (- x (fma (+ y -1.0) z (* a (+ t -1.0)))))
   (* b (- (+ y t) 2.0))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= 1.62e+212) {
		tmp = fma((y + (t + -2.0)), b, (x - fma((y + -1.0), z, (a * (t + -1.0)))));
	} else {
		tmp = b * ((y + t) - 2.0);
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (b <= 1.62e+212)
		tmp = fma(Float64(y + Float64(t + -2.0)), b, Float64(x - fma(Float64(y + -1.0), z, Float64(a * Float64(t + -1.0)))));
	else
		tmp = Float64(b * Float64(Float64(y + t) - 2.0));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1.62e+212], 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], N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.62 \cdot 10^{+212}:\\
\;\;\;\;\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 1.61999999999999994e212

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.61999999999999994e212 < b

    1. Initial program 81.5%

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

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

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

Alternative 2: 42.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(-z\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -7400:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-134}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{-307}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{-229}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-131}:\\ \;\;\;\;b \cdot y\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-64}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{-34}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4800:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+18}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- z))) (t_2 (* t (- b a))))
   (if (<= t -7400.0)
     t_2
     (if (<= t -3.8e-134)
       x
       (if (<= t -1.3e-307)
         t_1
         (if (<= t 2.05e-229)
           x
           (if (<= t 2.2e-131)
             (* b y)
             (if (<= t 2.2e-64)
               x
               (if (<= t 1.05e-34)
                 t_1
                 (if (<= t 4800.0)
                   (* a (- 1.0 t))
                   (if (<= t 4.4e+18) t_1 t_2)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * -z;
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -7400.0) {
		tmp = t_2;
	} else if (t <= -3.8e-134) {
		tmp = x;
	} else if (t <= -1.3e-307) {
		tmp = t_1;
	} else if (t <= 2.05e-229) {
		tmp = x;
	} else if (t <= 2.2e-131) {
		tmp = b * y;
	} else if (t <= 2.2e-64) {
		tmp = x;
	} else if (t <= 1.05e-34) {
		tmp = t_1;
	} else if (t <= 4800.0) {
		tmp = a * (1.0 - t);
	} else if (t <= 4.4e+18) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * -z
    t_2 = t * (b - a)
    if (t <= (-7400.0d0)) then
        tmp = t_2
    else if (t <= (-3.8d-134)) then
        tmp = x
    else if (t <= (-1.3d-307)) then
        tmp = t_1
    else if (t <= 2.05d-229) then
        tmp = x
    else if (t <= 2.2d-131) then
        tmp = b * y
    else if (t <= 2.2d-64) then
        tmp = x
    else if (t <= 1.05d-34) then
        tmp = t_1
    else if (t <= 4800.0d0) then
        tmp = a * (1.0d0 - t)
    else if (t <= 4.4d+18) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * -z;
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -7400.0) {
		tmp = t_2;
	} else if (t <= -3.8e-134) {
		tmp = x;
	} else if (t <= -1.3e-307) {
		tmp = t_1;
	} else if (t <= 2.05e-229) {
		tmp = x;
	} else if (t <= 2.2e-131) {
		tmp = b * y;
	} else if (t <= 2.2e-64) {
		tmp = x;
	} else if (t <= 1.05e-34) {
		tmp = t_1;
	} else if (t <= 4800.0) {
		tmp = a * (1.0 - t);
	} else if (t <= 4.4e+18) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * -z
	t_2 = t * (b - a)
	tmp = 0
	if t <= -7400.0:
		tmp = t_2
	elif t <= -3.8e-134:
		tmp = x
	elif t <= -1.3e-307:
		tmp = t_1
	elif t <= 2.05e-229:
		tmp = x
	elif t <= 2.2e-131:
		tmp = b * y
	elif t <= 2.2e-64:
		tmp = x
	elif t <= 1.05e-34:
		tmp = t_1
	elif t <= 4800.0:
		tmp = a * (1.0 - t)
	elif t <= 4.4e+18:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(-z))
	t_2 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -7400.0)
		tmp = t_2;
	elseif (t <= -3.8e-134)
		tmp = x;
	elseif (t <= -1.3e-307)
		tmp = t_1;
	elseif (t <= 2.05e-229)
		tmp = x;
	elseif (t <= 2.2e-131)
		tmp = Float64(b * y);
	elseif (t <= 2.2e-64)
		tmp = x;
	elseif (t <= 1.05e-34)
		tmp = t_1;
	elseif (t <= 4800.0)
		tmp = Float64(a * Float64(1.0 - t));
	elseif (t <= 4.4e+18)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * -z;
	t_2 = t * (b - a);
	tmp = 0.0;
	if (t <= -7400.0)
		tmp = t_2;
	elseif (t <= -3.8e-134)
		tmp = x;
	elseif (t <= -1.3e-307)
		tmp = t_1;
	elseif (t <= 2.05e-229)
		tmp = x;
	elseif (t <= 2.2e-131)
		tmp = b * y;
	elseif (t <= 2.2e-64)
		tmp = x;
	elseif (t <= 1.05e-34)
		tmp = t_1;
	elseif (t <= 4800.0)
		tmp = a * (1.0 - t);
	elseif (t <= 4.4e+18)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * (-z)), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7400.0], t$95$2, If[LessEqual[t, -3.8e-134], x, If[LessEqual[t, -1.3e-307], t$95$1, If[LessEqual[t, 2.05e-229], x, If[LessEqual[t, 2.2e-131], N[(b * y), $MachinePrecision], If[LessEqual[t, 2.2e-64], x, If[LessEqual[t, 1.05e-34], t$95$1, If[LessEqual[t, 4800.0], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.4e+18], t$95$1, t$95$2]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(-z\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -7400:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -3.8 \cdot 10^{-134}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq -1.3 \cdot 10^{-307}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.05 \cdot 10^{-229}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{-131}:\\
\;\;\;\;b \cdot y\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{-64}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.05 \cdot 10^{-34}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 4800:\\
\;\;\;\;a \cdot \left(1 - t\right)\\

\mathbf{elif}\;t \leq 4.4 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -7400 or 4.4e18 < t

    1. Initial program 91.9%

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

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

    if -7400 < t < -3.80000000000000003e-134 or -1.29999999999999998e-307 < t < 2.05e-229 or 2.2e-131 < t < 2.2e-64

    1. Initial program 96.3%

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

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

    if -3.80000000000000003e-134 < t < -1.29999999999999998e-307 or 2.2e-64 < t < 1.05e-34 or 4800 < t < 4.4e18

    1. Initial program 94.3%

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

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

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

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

        \[\leadsto \color{blue}{\left(-y\right) \cdot z} \]
      3. *-commutative39.1%

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

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

    if 2.05e-229 < t < 2.2e-131

    1. Initial program 92.9%

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

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

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

    if 1.05e-34 < t < 4800

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7400:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-134}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{-307}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{-229}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-131}:\\ \;\;\;\;b \cdot y\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-64}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{-34}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;t \leq 4800:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+18}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 97.6% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 100.0%

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

    if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) b))

    1. Initial program 0.0%

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

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

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

Alternative 4: 54.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(z + a\right)\\ t_2 := x - y \cdot z\\ t_3 := y \cdot \left(b - z\right)\\ t_4 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -8.5 \cdot 10^{+34}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-152}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-298}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-245}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{-131}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-41}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 35000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+19}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (+ z a)))
        (t_2 (- x (* y z)))
        (t_3 (* y (- b z)))
        (t_4 (* t (- b a))))
   (if (<= t -8.5e+34)
     t_4
     (if (<= t -5.5e-152)
       t_1
       (if (<= t -1.45e-298)
         t_3
         (if (<= t 1.4e-245)
           t_1
           (if (<= t 9.2e-131)
             t_3
             (if (<= t 1.65e-41)
               t_2
               (if (<= t 35000.0) t_1 (if (<= t 2.7e+19) t_2 t_4))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (z + a);
	double t_2 = x - (y * z);
	double t_3 = y * (b - z);
	double t_4 = t * (b - a);
	double tmp;
	if (t <= -8.5e+34) {
		tmp = t_4;
	} else if (t <= -5.5e-152) {
		tmp = t_1;
	} else if (t <= -1.45e-298) {
		tmp = t_3;
	} else if (t <= 1.4e-245) {
		tmp = t_1;
	} else if (t <= 9.2e-131) {
		tmp = t_3;
	} else if (t <= 1.65e-41) {
		tmp = t_2;
	} else if (t <= 35000.0) {
		tmp = t_1;
	} else if (t <= 2.7e+19) {
		tmp = t_2;
	} else {
		tmp = t_4;
	}
	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 + (z + a)
    t_2 = x - (y * z)
    t_3 = y * (b - z)
    t_4 = t * (b - a)
    if (t <= (-8.5d+34)) then
        tmp = t_4
    else if (t <= (-5.5d-152)) then
        tmp = t_1
    else if (t <= (-1.45d-298)) then
        tmp = t_3
    else if (t <= 1.4d-245) then
        tmp = t_1
    else if (t <= 9.2d-131) then
        tmp = t_3
    else if (t <= 1.65d-41) then
        tmp = t_2
    else if (t <= 35000.0d0) then
        tmp = t_1
    else if (t <= 2.7d+19) then
        tmp = t_2
    else
        tmp = t_4
    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);
	double t_2 = x - (y * z);
	double t_3 = y * (b - z);
	double t_4 = t * (b - a);
	double tmp;
	if (t <= -8.5e+34) {
		tmp = t_4;
	} else if (t <= -5.5e-152) {
		tmp = t_1;
	} else if (t <= -1.45e-298) {
		tmp = t_3;
	} else if (t <= 1.4e-245) {
		tmp = t_1;
	} else if (t <= 9.2e-131) {
		tmp = t_3;
	} else if (t <= 1.65e-41) {
		tmp = t_2;
	} else if (t <= 35000.0) {
		tmp = t_1;
	} else if (t <= 2.7e+19) {
		tmp = t_2;
	} else {
		tmp = t_4;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (z + a)
	t_2 = x - (y * z)
	t_3 = y * (b - z)
	t_4 = t * (b - a)
	tmp = 0
	if t <= -8.5e+34:
		tmp = t_4
	elif t <= -5.5e-152:
		tmp = t_1
	elif t <= -1.45e-298:
		tmp = t_3
	elif t <= 1.4e-245:
		tmp = t_1
	elif t <= 9.2e-131:
		tmp = t_3
	elif t <= 1.65e-41:
		tmp = t_2
	elif t <= 35000.0:
		tmp = t_1
	elif t <= 2.7e+19:
		tmp = t_2
	else:
		tmp = t_4
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(z + a))
	t_2 = Float64(x - Float64(y * z))
	t_3 = Float64(y * Float64(b - z))
	t_4 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -8.5e+34)
		tmp = t_4;
	elseif (t <= -5.5e-152)
		tmp = t_1;
	elseif (t <= -1.45e-298)
		tmp = t_3;
	elseif (t <= 1.4e-245)
		tmp = t_1;
	elseif (t <= 9.2e-131)
		tmp = t_3;
	elseif (t <= 1.65e-41)
		tmp = t_2;
	elseif (t <= 35000.0)
		tmp = t_1;
	elseif (t <= 2.7e+19)
		tmp = t_2;
	else
		tmp = t_4;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (z + a);
	t_2 = x - (y * z);
	t_3 = y * (b - z);
	t_4 = t * (b - a);
	tmp = 0.0;
	if (t <= -8.5e+34)
		tmp = t_4;
	elseif (t <= -5.5e-152)
		tmp = t_1;
	elseif (t <= -1.45e-298)
		tmp = t_3;
	elseif (t <= 1.4e-245)
		tmp = t_1;
	elseif (t <= 9.2e-131)
		tmp = t_3;
	elseif (t <= 1.65e-41)
		tmp = t_2;
	elseif (t <= 35000.0)
		tmp = t_1;
	elseif (t <= 2.7e+19)
		tmp = t_2;
	else
		tmp = t_4;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.5e+34], t$95$4, If[LessEqual[t, -5.5e-152], t$95$1, If[LessEqual[t, -1.45e-298], t$95$3, If[LessEqual[t, 1.4e-245], t$95$1, If[LessEqual[t, 9.2e-131], t$95$3, If[LessEqual[t, 1.65e-41], t$95$2, If[LessEqual[t, 35000.0], t$95$1, If[LessEqual[t, 2.7e+19], t$95$2, t$95$4]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -5.5 \cdot 10^{-152}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.45 \cdot 10^{-298}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq 1.4 \cdot 10^{-245}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 9.2 \cdot 10^{-131}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq 1.65 \cdot 10^{-41}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 35000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.7 \cdot 10^{+19}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;t\_4\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -8.5000000000000003e34 or 2.7e19 < t

    1. Initial program 91.6%

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

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

    if -8.5000000000000003e34 < t < -5.4999999999999998e-152 or -1.45000000000000007e-298 < t < 1.4000000000000001e-245 or 1.65000000000000012e-41 < t < 35000

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.4999999999999998e-152 < t < -1.45000000000000007e-298 or 1.4000000000000001e-245 < t < 9.20000000000000087e-131

    1. Initial program 92.2%

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

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

    if 9.20000000000000087e-131 < t < 1.65000000000000012e-41 or 35000 < t < 2.7e19

    1. Initial program 96.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.5 \cdot 10^{+34}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-152}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-298}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-245}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{-131}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-41}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;t \leq 35000:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+19}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 26.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(-z\right)\\ t_2 := t \cdot \left(-a\right)\\ \mathbf{if}\;x \leq -1.05 \cdot 10^{+157}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -5.8 \cdot 10^{-59}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-186}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{-90}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 2.4:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{+139}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- z))) (t_2 (* t (- a))))
   (if (<= x -1.05e+157)
     x
     (if (<= x -5.8e-59)
       t_2
       (if (<= x 4.2e-186)
         t_1
         (if (<= x 6.2e-90)
           t_2
           (if (<= x 2.4) t_1 (if (<= x 3.5e+139) t_2 x))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * -z;
	double t_2 = t * -a;
	double tmp;
	if (x <= -1.05e+157) {
		tmp = x;
	} else if (x <= -5.8e-59) {
		tmp = t_2;
	} else if (x <= 4.2e-186) {
		tmp = t_1;
	} else if (x <= 6.2e-90) {
		tmp = t_2;
	} else if (x <= 2.4) {
		tmp = t_1;
	} else if (x <= 3.5e+139) {
		tmp = t_2;
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * -z
    t_2 = t * -a
    if (x <= (-1.05d+157)) then
        tmp = x
    else if (x <= (-5.8d-59)) then
        tmp = t_2
    else if (x <= 4.2d-186) then
        tmp = t_1
    else if (x <= 6.2d-90) then
        tmp = t_2
    else if (x <= 2.4d0) then
        tmp = t_1
    else if (x <= 3.5d+139) then
        tmp = t_2
    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 t_1 = y * -z;
	double t_2 = t * -a;
	double tmp;
	if (x <= -1.05e+157) {
		tmp = x;
	} else if (x <= -5.8e-59) {
		tmp = t_2;
	} else if (x <= 4.2e-186) {
		tmp = t_1;
	} else if (x <= 6.2e-90) {
		tmp = t_2;
	} else if (x <= 2.4) {
		tmp = t_1;
	} else if (x <= 3.5e+139) {
		tmp = t_2;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * -z
	t_2 = t * -a
	tmp = 0
	if x <= -1.05e+157:
		tmp = x
	elif x <= -5.8e-59:
		tmp = t_2
	elif x <= 4.2e-186:
		tmp = t_1
	elif x <= 6.2e-90:
		tmp = t_2
	elif x <= 2.4:
		tmp = t_1
	elif x <= 3.5e+139:
		tmp = t_2
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(-z))
	t_2 = Float64(t * Float64(-a))
	tmp = 0.0
	if (x <= -1.05e+157)
		tmp = x;
	elseif (x <= -5.8e-59)
		tmp = t_2;
	elseif (x <= 4.2e-186)
		tmp = t_1;
	elseif (x <= 6.2e-90)
		tmp = t_2;
	elseif (x <= 2.4)
		tmp = t_1;
	elseif (x <= 3.5e+139)
		tmp = t_2;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * -z;
	t_2 = t * -a;
	tmp = 0.0;
	if (x <= -1.05e+157)
		tmp = x;
	elseif (x <= -5.8e-59)
		tmp = t_2;
	elseif (x <= 4.2e-186)
		tmp = t_1;
	elseif (x <= 6.2e-90)
		tmp = t_2;
	elseif (x <= 2.4)
		tmp = t_1;
	elseif (x <= 3.5e+139)
		tmp = t_2;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * (-z)), $MachinePrecision]}, Block[{t$95$2 = N[(t * (-a)), $MachinePrecision]}, If[LessEqual[x, -1.05e+157], x, If[LessEqual[x, -5.8e-59], t$95$2, If[LessEqual[x, 4.2e-186], t$95$1, If[LessEqual[x, 6.2e-90], t$95$2, If[LessEqual[x, 2.4], t$95$1, If[LessEqual[x, 3.5e+139], t$95$2, x]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -5.8 \cdot 10^{-59}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 4.2 \cdot 10^{-186}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 6.2 \cdot 10^{-90}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 2.4:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 3.5 \cdot 10^{+139}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.05e157 or 3.49999999999999978e139 < x

    1. Initial program 97.3%

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

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

    if -1.05e157 < x < -5.80000000000000033e-59 or 4.2000000000000004e-186 < x < 6.2000000000000003e-90 or 2.39999999999999991 < x < 3.49999999999999978e139

    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. Add Preprocessing
    3. Taylor expanded in t around inf 49.5%

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

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

        \[\leadsto \color{blue}{-a \cdot t} \]
      2. distribute-rgt-neg-in33.0%

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

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

    if -5.80000000000000033e-59 < x < 4.2000000000000004e-186 or 6.2000000000000003e-90 < x < 2.39999999999999991

    1. Initial program 90.2%

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

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. distribute-lft-neg-out33.4%

        \[\leadsto \color{blue}{\left(-y\right) \cdot z} \]
      3. *-commutative33.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.05 \cdot 10^{+157}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -5.8 \cdot 10^{-59}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-186}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{-90}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;x \leq 2.4:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{+139}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 57.5% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;t \leq 2.4 \cdot 10^{-35}:\\
\;\;\;\;y \cdot \left(b - z\right)\\

\mathbf{elif}\;t \leq 30000:\\
\;\;\;\;x + \left(z + a\right)\\

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2.89999999999999995e35 or 1.12e20 < t

    1. Initial program 91.6%

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

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

    if -2.89999999999999995e35 < t < 5.7999999999999998e-64

    1. Initial program 94.6%

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

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

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

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

    if 5.7999999999999998e-64 < t < 2.4000000000000001e-35

    1. Initial program 100.0%

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

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

    if 2.4000000000000001e-35 < t < 3e4

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 3e4 < t < 1.12e20

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{+35}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-64}:\\ \;\;\;\;x + b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-35}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 30000:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{+20}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 25.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(-a\right)\\ \mathbf{if}\;x \leq -4.2 \cdot 10^{+157}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -6 \cdot 10^{-68}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{-251}:\\ \;\;\;\;b \cdot y\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-187}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+139}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* t (- a))))
   (if (<= x -4.2e+157)
     x
     (if (<= x -6e-68)
       t_1
       (if (<= x 1.7e-251)
         (* b y)
         (if (<= x 4.5e-187) a (if (<= x 9.5e+139) t_1 x)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * -a;
	double tmp;
	if (x <= -4.2e+157) {
		tmp = x;
	} else if (x <= -6e-68) {
		tmp = t_1;
	} else if (x <= 1.7e-251) {
		tmp = b * y;
	} else if (x <= 4.5e-187) {
		tmp = a;
	} else if (x <= 9.5e+139) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = t * -a
    if (x <= (-4.2d+157)) then
        tmp = x
    else if (x <= (-6d-68)) then
        tmp = t_1
    else if (x <= 1.7d-251) then
        tmp = b * y
    else if (x <= 4.5d-187) then
        tmp = a
    else if (x <= 9.5d+139) then
        tmp = t_1
    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 t_1 = t * -a;
	double tmp;
	if (x <= -4.2e+157) {
		tmp = x;
	} else if (x <= -6e-68) {
		tmp = t_1;
	} else if (x <= 1.7e-251) {
		tmp = b * y;
	} else if (x <= 4.5e-187) {
		tmp = a;
	} else if (x <= 9.5e+139) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t * -a
	tmp = 0
	if x <= -4.2e+157:
		tmp = x
	elif x <= -6e-68:
		tmp = t_1
	elif x <= 1.7e-251:
		tmp = b * y
	elif x <= 4.5e-187:
		tmp = a
	elif x <= 9.5e+139:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t * Float64(-a))
	tmp = 0.0
	if (x <= -4.2e+157)
		tmp = x;
	elseif (x <= -6e-68)
		tmp = t_1;
	elseif (x <= 1.7e-251)
		tmp = Float64(b * y);
	elseif (x <= 4.5e-187)
		tmp = a;
	elseif (x <= 9.5e+139)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t * -a;
	tmp = 0.0;
	if (x <= -4.2e+157)
		tmp = x;
	elseif (x <= -6e-68)
		tmp = t_1;
	elseif (x <= 1.7e-251)
		tmp = b * y;
	elseif (x <= 4.5e-187)
		tmp = a;
	elseif (x <= 9.5e+139)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * (-a)), $MachinePrecision]}, If[LessEqual[x, -4.2e+157], x, If[LessEqual[x, -6e-68], t$95$1, If[LessEqual[x, 1.7e-251], N[(b * y), $MachinePrecision], If[LessEqual[x, 4.5e-187], a, If[LessEqual[x, 9.5e+139], t$95$1, x]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -6 \cdot 10^{-68}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 1.7 \cdot 10^{-251}:\\
\;\;\;\;b \cdot y\\

\mathbf{elif}\;x \leq 4.5 \cdot 10^{-187}:\\
\;\;\;\;a\\

\mathbf{elif}\;x \leq 9.5 \cdot 10^{+139}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -4.2e157 or 9.5000000000000002e139 < x

    1. Initial program 97.3%

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

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

    if -4.2e157 < x < -6e-68 or 4.4999999999999998e-187 < x < 9.5000000000000002e139

    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. Add Preprocessing
    3. Taylor expanded in t around inf 47.5%

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

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

        \[\leadsto \color{blue}{-a \cdot t} \]
      2. distribute-rgt-neg-in32.7%

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

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

    if -6e-68 < x < 1.70000000000000008e-251

    1. Initial program 87.7%

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

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

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

    if 1.70000000000000008e-251 < x < 4.4999999999999998e-187

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.2 \cdot 10^{+157}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -6 \cdot 10^{-68}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{-251}:\\ \;\;\;\;b \cdot y\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-187}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+139}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 66.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq 5.8 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 5.3 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.10000000000000017e35 or 5.3e20 < t

    1. Initial program 91.6%

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

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

    if -5.10000000000000017e35 < t < 5.7999999999999998e-64 or 2.6000000000000002e-46 < t < 5.3e20

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

    if 5.7999999999999998e-64 < t < 2.6000000000000002e-46

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.1 \cdot 10^{+35}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-64}:\\ \;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-46}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 5.3 \cdot 10^{+20}:\\ \;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 71.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \leq -2 \cdot 10^{-297}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;b \leq 3.7 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -8.9999999999999995e-15 or 3.70000000000000009e-25 < b

    1. Initial program 87.4%

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

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

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

    if -8.9999999999999995e-15 < b < -2.00000000000000008e-297 or 8.4999999999999999e-294 < b < 3.70000000000000009e-25

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

    if -2.00000000000000008e-297 < b < 8.4999999999999999e-294

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9 \cdot 10^{-15}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -2 \cdot 10^{-297}:\\ \;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\ \mathbf{elif}\;b \leq 8.5 \cdot 10^{-294}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{-25}:\\ \;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 69.9% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \leq -1.5 \cdot 10^{-207}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;b \leq 8 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -8.0000000000000006e-15 or 8.00000000000000031e-25 < b

    1. Initial program 87.4%

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

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

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

    if -8.0000000000000006e-15 < b < -1.5e-207 or 9.59999999999999988e-294 < b < 8.00000000000000031e-25

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

    if -1.5e-207 < b < 9.59999999999999988e-294

    1. Initial program 100.0%

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot t + z \cdot \left(y - 1\right)\right)} \]
    8. Step-by-step derivation
      1. distribute-lft-in80.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, -\color{blue}{\left(-1 + y\right)}, -t \cdot a\right) \]
      11. distribute-neg-in80.4%

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

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

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

        \[\leadsto \color{blue}{z \cdot \left(1 - y\right) - t \cdot a} \]
      15. *-commutative80.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8 \cdot 10^{-15}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -1.5 \cdot 10^{-207}:\\ \;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\ \mathbf{elif}\;b \leq 9.6 \cdot 10^{-294}:\\ \;\;\;\;z \cdot \left(1 - y\right) - t \cdot a\\ \mathbf{elif}\;b \leq 8 \cdot 10^{-25}:\\ \;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 49.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq -3.7 \cdot 10^{+57}:\\
\;\;\;\;x - t \cdot a\\

\mathbf{elif}\;y \leq -1.35 \cdot 10^{+39} \lor \neg \left(y \leq 1.4 \cdot 10^{+32}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.6e126 or -3.70000000000000006e57 < y < -1.35000000000000002e39 or 1.4e32 < y

    1. Initial program 88.7%

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

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

    if -2.6e126 < y < -3.70000000000000006e57

    1. Initial program 92.9%

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

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

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

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

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

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

    if -1.35000000000000002e39 < y < 1.4e32

    1. Initial program 97.2%

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

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

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

      \[\leadsto x + \color{blue}{b \cdot t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification59.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.6 \cdot 10^{+126}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -3.7 \cdot 10^{+57}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{+39} \lor \neg \left(y \leq 1.4 \cdot 10^{+32}\right):\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot t\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 35.7% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -2.1 \cdot 10^{-110}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -5.2 \cdot 10^{-289}:\\
\;\;\;\;y \cdot \left(-z\right)\\

\mathbf{elif}\;a \leq 3.15 \cdot 10^{+25}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.8000000000000003e34 or 3.14999999999999987e25 < a

    1. Initial program 91.0%

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

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

    if -5.8000000000000003e34 < a < -2.10000000000000002e-110 or -5.1999999999999998e-289 < a < 3.14999999999999987e25

    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. Add Preprocessing
    3. Taylor expanded in x around inf 33.2%

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

    if -2.10000000000000002e-110 < a < -5.1999999999999998e-289

    1. Initial program 94.8%

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

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

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

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

        \[\leadsto \color{blue}{\left(-y\right) \cdot z} \]
      3. *-commutative30.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+34}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-110}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-289}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;a \leq 3.15 \cdot 10^{+25}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 50.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq -2.2 \cdot 10^{-307}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 5.5 \cdot 10^{-248}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.52 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.2500000000000002e35 or 1.52e16 < t

    1. Initial program 91.6%

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

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

    if -3.2500000000000002e35 < t < -2.2e-307 or 5.49999999999999979e-248 < t < 1.52e16

    1. Initial program 95.1%

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

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

    if -2.2e-307 < t < 5.49999999999999979e-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. Add Preprocessing
    3. Taylor expanded in x around inf 38.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.25 \cdot 10^{+35}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{-307}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-248}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.52 \cdot 10^{+16}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 52.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq 4.5 \cdot 10^{-229}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 3.05 \cdot 10^{-130}:\\
\;\;\;\;y \cdot \left(b - z\right)\\

\mathbf{elif}\;t \leq 3.7 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9e3 or 3.7e18 < t

    1. Initial program 91.9%

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

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

    if -9e3 < t < 4.5000000000000002e-229 or 3.04999999999999998e-130 < t < 3.7e18

    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. Add Preprocessing
    3. Taylor expanded in b around 0 74.0%

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

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

    if 4.5000000000000002e-229 < t < 3.04999999999999998e-130

    1. Initial program 92.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9000:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-229}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;t \leq 3.05 \cdot 10^{-130}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{+18}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 86.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;b \leq -6.8 \cdot 10^{-15} \lor \neg \left(b \leq 1.05 \cdot 10^{-51}\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 -6.8e-15) (not (<= b 1.05e-51)))
     (+ (+ 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 <= -6.8e-15) || !(b <= 1.05e-51)) {
		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 <= (-6.8d-15)) .or. (.not. (b <= 1.05d-51))) 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 <= -6.8e-15) || !(b <= 1.05e-51)) {
		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 <= -6.8e-15) or not (b <= 1.05e-51):
		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 <= -6.8e-15) || !(b <= 1.05e-51))
		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 <= -6.8e-15) || ~((b <= 1.05e-51)))
		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, -6.8e-15], N[Not[LessEqual[b, 1.05e-51]], $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 -6.8 \cdot 10^{-15} \lor \neg \left(b \leq 1.05 \cdot 10^{-51}\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 < -6.8000000000000001e-15 or 1.05000000000000001e-51 < b

    1. Initial program 88.2%

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

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

    if -6.8000000000000001e-15 < b < 1.05000000000000001e-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. Add Preprocessing
    3. Taylor expanded in b around 0 93.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.8 \cdot 10^{-15} \lor \neg \left(b \leq 1.05 \cdot 10^{-51}\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} \]
  5. Add Preprocessing

Alternative 16: 82.0% accurate, 0.9× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


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

    1. Initial program 87.7%

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

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

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

    if -8.9999999999999995e-15 < b < 4e145

    1. Initial program 99.3%

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

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

    if 4e145 < b

    1. Initial program 82.1%

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

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

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

Alternative 17: 55.2% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;b \leq 1.55 \cdot 10^{+41}:\\
\;\;\;\;x - t \cdot a\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.7e11 or 1.55e41 < b

    1. Initial program 86.5%

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

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

    if -3.7e11 < b < 1.9000000000000001e-232

    1. Initial program 100.0%

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

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

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

    if 1.9000000000000001e-232 < b < 1.55e41

    1. Initial program 98.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -370000000000:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 1.9 \cdot 10^{-232}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq 1.55 \cdot 10^{+41}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 74.9% accurate, 1.0× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


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

    1. Initial program 87.7%

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

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

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

    if -8.9999999999999995e-15 < b < 4.2999999999999999e136

    1. Initial program 99.3%

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

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

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

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

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

    if 4.2999999999999999e136 < b

    1. Initial program 82.1%

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

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

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

Alternative 19: 62.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.4 \cdot 10^{+128} \lor \neg \left(a \leq 1.85 \cdot 10^{+146}\right):\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.39999999999999971e128 or 1.85000000000000002e146 < a

    1. Initial program 92.2%

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

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

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

    if -6.39999999999999971e128 < a < 1.85000000000000002e146

    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. Add Preprocessing
    3. Taylor expanded in z around 0 74.8%

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

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

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

Alternative 20: 51.2% accurate, 1.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.20000000000000035e38 or 3.1000000000000002e31 < y

    1. Initial program 89.2%

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

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

    if -6.20000000000000035e38 < y < 3.1000000000000002e31

    1. Initial program 97.2%

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

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

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

      \[\leadsto x + \color{blue}{b \cdot t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification57.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{+38} \lor \neg \left(y \leq 3.1 \cdot 10^{+31}\right):\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot t\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 24.5% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+191} \lor \neg \left(y \leq 2.4 \cdot 10^{+58}\right):\\
\;\;\;\;b \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.5000000000000001e191 or 2.4e58 < y

    1. Initial program 85.1%

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

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

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

    if -2.5000000000000001e191 < y < 2.4e58

    1. Initial program 97.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+191} \lor \neg \left(y \leq 2.4 \cdot 10^{+58}\right):\\ \;\;\;\;b \cdot y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 20.4% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{-15}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 1.9 \cdot 10^{+139}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.0000000000000001e-15 or 1.9e139 < x

    1. Initial program 96.1%

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

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

    if -7.0000000000000001e-15 < x < 1.9e139

    1. Initial program 92.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7 \cdot 10^{-15}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{+139}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 11.1% 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 93.7%

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

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

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

    \[\leadsto a \]
  6. Add Preprocessing

Reproduce

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