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

Percentage Accurate: 95.3% → 98.0%
Time: 19.2s
Alternatives: 22
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 alternatives:

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

Initial Program: 95.3% accurate, 1.0× speedup?

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

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

Alternative 1: 98.0% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) 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 #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) 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 t around inf 67.7%

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

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

Alternative 2: 97.5% accurate, 0.1× speedup?

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

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

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

      \[\leadsto \color{blue}{\left(\left(y + t\right) - 2\right) \cdot b + \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right)} \]
    2. fma-define96.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+96.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-neg96.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-eval96.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-neg96.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-96.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-neg97.2%

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

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

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

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

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

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

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

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

Alternative 3: 39.8% accurate, 0.5× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 2.75 \cdot 10^{-131}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-83}:\\
\;\;\;\;t \cdot b\\

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

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

\mathbf{elif}\;a \leq 6.2 \cdot 10^{+104}:\\
\;\;\;\;x + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.4e41 or 6.20000000000000033e104 < a

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

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

    if -1.4e41 < a < -5.3000000000000002e-20 or 5.2000000000000001e-235 < a < 2.7499999999999998e-131

    1. Initial program 91.2%

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

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

        \[\leadsto \color{blue}{\left(-a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. distribute-rgt-neg-in59.6%

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

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

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

    if -5.3000000000000002e-20 < a < 5.2000000000000001e-235 or 4.49999999999999997e-83 < a < 7.00000000000000011e-22 or 2.00000000000000012e-9 < a < 6.20000000000000033e104

    1. Initial program 96.9%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv38.8%

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

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

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

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

    if 2.7499999999999998e-131 < a < 4.49999999999999997e-83

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

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

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

        \[\leadsto \color{blue}{t \cdot b} \]
    6. Simplified48.2%

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

    if 7.00000000000000011e-22 < a < 2.00000000000000012e-9

    1. Initial program 99.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 y around 0 99.6%

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} \]
    8. Step-by-step derivation
      1. associate-*r*88.8%

        \[\leadsto \color{blue}{\left(-1 \cdot y\right) \cdot z} \]
      2. mul-1-neg88.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{+41}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -5.3 \cdot 10^{-20}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-235}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;a \leq 2.75 \cdot 10^{-131}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-83}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-22}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-9}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+104}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 82.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ t_2 := x + \left(t\_1 + z \cdot \left(1 - y\right)\right)\\ t_3 := b \cdot \left(\left(y + t\right) - 2\right)\\ t_4 := t\_3 + t\_1\\ t_5 := x + t\_3\\ \mathbf{if}\;b \leq -6 \cdot 10^{+208}:\\ \;\;\;\;t\_5\\ \mathbf{elif}\;b \leq -1.55 \cdot 10^{+186}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq -3.3 \cdot 10^{+56}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;b \leq -2.3 \cdot 10^{-44}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq -5.2 \cdot 10^{-86}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;b \leq 1.3 \cdot 10^{+88}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_5\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- 1.0 t)))
        (t_2 (+ x (+ t_1 (* z (- 1.0 y)))))
        (t_3 (* b (- (+ y t) 2.0)))
        (t_4 (+ t_3 t_1))
        (t_5 (+ x t_3)))
   (if (<= b -6e+208)
     t_5
     (if (<= b -1.55e+186)
       t_2
       (if (<= b -3.3e+56)
         t_4
         (if (<= b -2.3e-44)
           t_2
           (if (<= b -5.2e-86) t_4 (if (<= b 1.3e+88) t_2 t_5))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double t_2 = x + (t_1 + (z * (1.0 - y)));
	double t_3 = b * ((y + t) - 2.0);
	double t_4 = t_3 + t_1;
	double t_5 = x + t_3;
	double tmp;
	if (b <= -6e+208) {
		tmp = t_5;
	} else if (b <= -1.55e+186) {
		tmp = t_2;
	} else if (b <= -3.3e+56) {
		tmp = t_4;
	} else if (b <= -2.3e-44) {
		tmp = t_2;
	} else if (b <= -5.2e-86) {
		tmp = t_4;
	} else if (b <= 1.3e+88) {
		tmp = t_2;
	} else {
		tmp = t_5;
	}
	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) :: t_5
    real(8) :: tmp
    t_1 = a * (1.0d0 - t)
    t_2 = x + (t_1 + (z * (1.0d0 - y)))
    t_3 = b * ((y + t) - 2.0d0)
    t_4 = t_3 + t_1
    t_5 = x + t_3
    if (b <= (-6d+208)) then
        tmp = t_5
    else if (b <= (-1.55d+186)) then
        tmp = t_2
    else if (b <= (-3.3d+56)) then
        tmp = t_4
    else if (b <= (-2.3d-44)) then
        tmp = t_2
    else if (b <= (-5.2d-86)) then
        tmp = t_4
    else if (b <= 1.3d+88) then
        tmp = t_2
    else
        tmp = t_5
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double t_2 = x + (t_1 + (z * (1.0 - y)));
	double t_3 = b * ((y + t) - 2.0);
	double t_4 = t_3 + t_1;
	double t_5 = x + t_3;
	double tmp;
	if (b <= -6e+208) {
		tmp = t_5;
	} else if (b <= -1.55e+186) {
		tmp = t_2;
	} else if (b <= -3.3e+56) {
		tmp = t_4;
	} else if (b <= -2.3e-44) {
		tmp = t_2;
	} else if (b <= -5.2e-86) {
		tmp = t_4;
	} else if (b <= 1.3e+88) {
		tmp = t_2;
	} else {
		tmp = t_5;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	t_2 = x + (t_1 + (z * (1.0 - y)))
	t_3 = b * ((y + t) - 2.0)
	t_4 = t_3 + t_1
	t_5 = x + t_3
	tmp = 0
	if b <= -6e+208:
		tmp = t_5
	elif b <= -1.55e+186:
		tmp = t_2
	elif b <= -3.3e+56:
		tmp = t_4
	elif b <= -2.3e-44:
		tmp = t_2
	elif b <= -5.2e-86:
		tmp = t_4
	elif b <= 1.3e+88:
		tmp = t_2
	else:
		tmp = t_5
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(1.0 - t))
	t_2 = Float64(x + Float64(t_1 + Float64(z * Float64(1.0 - y))))
	t_3 = Float64(b * Float64(Float64(y + t) - 2.0))
	t_4 = Float64(t_3 + t_1)
	t_5 = Float64(x + t_3)
	tmp = 0.0
	if (b <= -6e+208)
		tmp = t_5;
	elseif (b <= -1.55e+186)
		tmp = t_2;
	elseif (b <= -3.3e+56)
		tmp = t_4;
	elseif (b <= -2.3e-44)
		tmp = t_2;
	elseif (b <= -5.2e-86)
		tmp = t_4;
	elseif (b <= 1.3e+88)
		tmp = t_2;
	else
		tmp = t_5;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (1.0 - t);
	t_2 = x + (t_1 + (z * (1.0 - y)));
	t_3 = b * ((y + t) - 2.0);
	t_4 = t_3 + t_1;
	t_5 = x + t_3;
	tmp = 0.0;
	if (b <= -6e+208)
		tmp = t_5;
	elseif (b <= -1.55e+186)
		tmp = t_2;
	elseif (b <= -3.3e+56)
		tmp = t_4;
	elseif (b <= -2.3e-44)
		tmp = t_2;
	elseif (b <= -5.2e-86)
		tmp = t_4;
	elseif (b <= 1.3e+88)
		tmp = t_2;
	else
		tmp = t_5;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t$95$1 + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 + t$95$1), $MachinePrecision]}, Block[{t$95$5 = N[(x + t$95$3), $MachinePrecision]}, If[LessEqual[b, -6e+208], t$95$5, If[LessEqual[b, -1.55e+186], t$95$2, If[LessEqual[b, -3.3e+56], t$95$4, If[LessEqual[b, -2.3e-44], t$95$2, If[LessEqual[b, -5.2e-86], t$95$4, If[LessEqual[b, 1.3e+88], t$95$2, t$95$5]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -1.55 \cdot 10^{+186}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq -3.3 \cdot 10^{+56}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;b \leq -2.3 \cdot 10^{-44}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq -5.2 \cdot 10^{-86}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;b \leq 1.3 \cdot 10^{+88}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -5.99999999999999989e208 or 1.3e88 < b

    1. Initial program 82.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 56.3%

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

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

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

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

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

        \[\leadsto y \cdot \left(\frac{x}{y} - \left(\frac{a \cdot \left(t + \color{blue}{-1}\right)}{y} + \left(-1 \cdot \frac{z}{y} + z\right)\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      6. associate-/l*54.2%

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

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

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

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

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

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

    if -5.99999999999999989e208 < b < -1.5500000000000001e186 or -3.30000000000000002e56 < b < -2.29999999999999998e-44 or -5.2000000000000002e-86 < b < 1.3e88

    1. Initial program 98.8%

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

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

    if -1.5500000000000001e186 < b < -3.30000000000000002e56 or -2.29999999999999998e-44 < b < -5.2000000000000002e-86

    1. Initial program 94.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6 \cdot 10^{+208}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -1.55 \cdot 10^{+186}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq -3.3 \cdot 10^{+56}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq -2.3 \cdot 10^{-44}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq -5.2 \cdot 10^{-86}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.3 \cdot 10^{+88}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 50.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;b \leq -1.65 \cdot 10^{+41}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq -1.1 \cdot 10^{-153}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -3.95 \cdot 10^{-227}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{-307}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 1.3 \cdot 10^{-255}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;b \leq 1.36 \cdot 10^{+88}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- 1.0 t))) (t_2 (* b (- (+ y t) 2.0))))
   (if (<= b -1.65e+41)
     t_2
     (if (<= b -1.1e-153)
       t_1
       (if (<= b -3.95e-227)
         (+ x z)
         (if (<= b 5.8e-307)
           t_1
           (if (<= b 1.3e-255) (* y (- z)) (if (<= b 1.36e+88) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double t_2 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -1.65e+41) {
		tmp = t_2;
	} else if (b <= -1.1e-153) {
		tmp = t_1;
	} else if (b <= -3.95e-227) {
		tmp = x + z;
	} else if (b <= 5.8e-307) {
		tmp = t_1;
	} else if (b <= 1.3e-255) {
		tmp = y * -z;
	} else if (b <= 1.36e+88) {
		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 * (1.0d0 - t)
    t_2 = b * ((y + t) - 2.0d0)
    if (b <= (-1.65d+41)) then
        tmp = t_2
    else if (b <= (-1.1d-153)) then
        tmp = t_1
    else if (b <= (-3.95d-227)) then
        tmp = x + z
    else if (b <= 5.8d-307) then
        tmp = t_1
    else if (b <= 1.3d-255) then
        tmp = y * -z
    else if (b <= 1.36d+88) 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 * (1.0 - t);
	double t_2 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -1.65e+41) {
		tmp = t_2;
	} else if (b <= -1.1e-153) {
		tmp = t_1;
	} else if (b <= -3.95e-227) {
		tmp = x + z;
	} else if (b <= 5.8e-307) {
		tmp = t_1;
	} else if (b <= 1.3e-255) {
		tmp = y * -z;
	} else if (b <= 1.36e+88) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	t_2 = b * ((y + t) - 2.0)
	tmp = 0
	if b <= -1.65e+41:
		tmp = t_2
	elif b <= -1.1e-153:
		tmp = t_1
	elif b <= -3.95e-227:
		tmp = x + z
	elif b <= 5.8e-307:
		tmp = t_1
	elif b <= 1.3e-255:
		tmp = y * -z
	elif b <= 1.36e+88:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(1.0 - t))
	t_2 = Float64(b * Float64(Float64(y + t) - 2.0))
	tmp = 0.0
	if (b <= -1.65e+41)
		tmp = t_2;
	elseif (b <= -1.1e-153)
		tmp = t_1;
	elseif (b <= -3.95e-227)
		tmp = Float64(x + z);
	elseif (b <= 5.8e-307)
		tmp = t_1;
	elseif (b <= 1.3e-255)
		tmp = Float64(y * Float64(-z));
	elseif (b <= 1.36e+88)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (1.0 - t);
	t_2 = b * ((y + t) - 2.0);
	tmp = 0.0;
	if (b <= -1.65e+41)
		tmp = t_2;
	elseif (b <= -1.1e-153)
		tmp = t_1;
	elseif (b <= -3.95e-227)
		tmp = x + z;
	elseif (b <= 5.8e-307)
		tmp = t_1;
	elseif (b <= 1.3e-255)
		tmp = y * -z;
	elseif (b <= 1.36e+88)
		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[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.65e+41], t$95$2, If[LessEqual[b, -1.1e-153], t$95$1, If[LessEqual[b, -3.95e-227], N[(x + z), $MachinePrecision], If[LessEqual[b, 5.8e-307], t$95$1, If[LessEqual[b, 1.3e-255], N[(y * (-z)), $MachinePrecision], If[LessEqual[b, 1.36e+88], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -1.1 \cdot 10^{-153}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -3.95 \cdot 10^{-227}:\\
\;\;\;\;x + z\\

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

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

\mathbf{elif}\;b \leq 1.36 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.65e41 or 1.3600000000000001e88 < 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 73.5%

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

    if -1.65e41 < b < -1.1e-153 or -3.9500000000000001e-227 < b < 5.8000000000000001e-307 or 1.3000000000000001e-255 < b < 1.3600000000000001e88

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

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

    if -1.1e-153 < b < -3.9500000000000001e-227

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if 5.8000000000000001e-307 < b < 1.3000000000000001e-255

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} \]
    8. Step-by-step derivation
      1. associate-*r*73.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.65 \cdot 10^{+41}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -1.1 \cdot 10^{-153}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq -3.95 \cdot 10^{-227}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{-307}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.3 \cdot 10^{-255}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;b \leq 1.36 \cdot 10^{+88}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 60.4% accurate, 0.6× speedup?

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

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

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

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

\mathbf{elif}\;b \leq 1.95 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;b \leq 6.5 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -8.99999999999999991e57 or 6.5000000000000002e88 < b

    1. Initial program 85.7%

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

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

    if -8.99999999999999991e57 < b < 5.8000000000000001e-307 or 7.50000000000000005e-256 < b < 1.9500000000000001e34 or 8.99999999999999946e64 < b < 6.5000000000000002e88

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

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

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

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

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

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

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

    if 5.8000000000000001e-307 < b < 7.50000000000000005e-256

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} \]
    8. Step-by-step derivation
      1. associate-*r*73.4%

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

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

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

    if 1.9500000000000001e34 < b < 8.99999999999999946e64

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9 \cdot 10^{+57}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{-307}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 7.5 \cdot 10^{-256}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;b \leq 1.95 \cdot 10^{+34}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 9 \cdot 10^{+64}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{+88}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 67.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 6.9 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+48}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 1.25 \cdot 10^{+185}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.30000000000000011e142 or 6.9000000000000001e-12 < z < 2.0999999999999998e48

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

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

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

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

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

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

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

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

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

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

    if -1.30000000000000011e142 < z < 6.9000000000000001e-12 or 2.0999999999999998e48 < z < 1.24999999999999997e185

    1. Initial program 96.8%

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

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

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

    if 1.24999999999999997e185 < z

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - y \cdot z\right) - \color{blue}{\left(-z\right)} \]
    9. Simplified83.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+142}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;z \leq 6.9 \cdot 10^{-12}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+48}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+185}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;z + \left(x - y \cdot z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 39.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;a \leq -1.6 \cdot 10^{+41}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-20}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-284}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-83}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+108}:\\ \;\;\;\;x + z\\ \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 -1.6e+41)
     t_1
     (if (<= a -3.1e-20)
       (* y b)
       (if (<= a 3.5e-284)
         (+ x z)
         (if (<= a 3.5e-83) (* t b) (if (<= a 2.3e+108) (+ x z) 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 <= -1.6e+41) {
		tmp = t_1;
	} else if (a <= -3.1e-20) {
		tmp = y * b;
	} else if (a <= 3.5e-284) {
		tmp = x + z;
	} else if (a <= 3.5e-83) {
		tmp = t * b;
	} else if (a <= 2.3e+108) {
		tmp = x + 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 = a * (1.0d0 - t)
    if (a <= (-1.6d+41)) then
        tmp = t_1
    else if (a <= (-3.1d-20)) then
        tmp = y * b
    else if (a <= 3.5d-284) then
        tmp = x + z
    else if (a <= 3.5d-83) then
        tmp = t * b
    else if (a <= 2.3d+108) then
        tmp = x + 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 = a * (1.0 - t);
	double tmp;
	if (a <= -1.6e+41) {
		tmp = t_1;
	} else if (a <= -3.1e-20) {
		tmp = y * b;
	} else if (a <= 3.5e-284) {
		tmp = x + z;
	} else if (a <= 3.5e-83) {
		tmp = t * b;
	} else if (a <= 2.3e+108) {
		tmp = x + z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	tmp = 0
	if a <= -1.6e+41:
		tmp = t_1
	elif a <= -3.1e-20:
		tmp = y * b
	elif a <= 3.5e-284:
		tmp = x + z
	elif a <= 3.5e-83:
		tmp = t * b
	elif a <= 2.3e+108:
		tmp = x + z
	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 <= -1.6e+41)
		tmp = t_1;
	elseif (a <= -3.1e-20)
		tmp = Float64(y * b);
	elseif (a <= 3.5e-284)
		tmp = Float64(x + z);
	elseif (a <= 3.5e-83)
		tmp = Float64(t * b);
	elseif (a <= 2.3e+108)
		tmp = Float64(x + z);
	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 <= -1.6e+41)
		tmp = t_1;
	elseif (a <= -3.1e-20)
		tmp = y * b;
	elseif (a <= 3.5e-284)
		tmp = x + z;
	elseif (a <= 3.5e-83)
		tmp = t * b;
	elseif (a <= 2.3e+108)
		tmp = x + z;
	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, -1.6e+41], t$95$1, If[LessEqual[a, -3.1e-20], N[(y * b), $MachinePrecision], If[LessEqual[a, 3.5e-284], N[(x + z), $MachinePrecision], If[LessEqual[a, 3.5e-83], N[(t * b), $MachinePrecision], If[LessEqual[a, 2.3e+108], N[(x + z), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -3.1 \cdot 10^{-20}:\\
\;\;\;\;y \cdot b\\

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

\mathbf{elif}\;a \leq 3.5 \cdot 10^{-83}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;a \leq 2.3 \cdot 10^{+108}:\\
\;\;\;\;x + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.60000000000000005e41 or 2.2999999999999999e108 < a

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

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

    if -1.60000000000000005e41 < a < -3.1e-20

    1. Initial program 92.3%

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

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

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

        \[\leadsto \color{blue}{y \cdot b} \]
    6. Simplified47.8%

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

    if -3.1e-20 < a < 3.49999999999999975e-284 or 3.5000000000000003e-83 < a < 2.2999999999999999e108

    1. Initial program 96.6%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv39.0%

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

        \[\leadsto x + \color{blue}{1} \cdot z \]
      3. *-lft-identity39.0%

        \[\leadsto x + \color{blue}{z} \]
    7. Simplified39.0%

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

    if 3.49999999999999975e-284 < a < 3.5000000000000003e-83

    1. Initial program 95.9%

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

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

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

        \[\leadsto \color{blue}{t \cdot b} \]
    6. Simplified30.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.6 \cdot 10^{+41}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-20}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-284}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-83}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+108}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 60.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -7.8 \cdot 10^{-138}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 3.6 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.9999999999999998e41 or 3.5999999999999999e-28 < a

    1. Initial program 94.9%

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

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

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

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

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

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

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

    if -2.9999999999999998e41 < a < -7.7999999999999999e-138 or -9.5000000000000007e-215 < a < 3.5999999999999999e-28

    1. Initial program 95.0%

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

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

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

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

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

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

        \[\leadsto y \cdot \left(\frac{x}{y} - \left(\frac{a \cdot \left(t + \color{blue}{-1}\right)}{y} + \left(-1 \cdot \frac{z}{y} + z\right)\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      6. associate-/l*75.0%

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

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

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

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

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

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

    if -7.7999999999999999e-138 < a < -9.5000000000000007e-215

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3 \cdot 10^{+41}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -7.8 \cdot 10^{-138}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{-215}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-28}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 62.3% accurate, 0.8× speedup?

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

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

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

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

\mathbf{elif}\;b \leq 1.26 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.59999999999999987e55 or 1.26e88 < b

    1. Initial program 85.7%

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

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

    if -3.59999999999999987e55 < b < 3.20000000000000011e-307 or 2.4999999999999998e-255 < b < 1.26e88

    1. Initial program 99.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 y around 0 99.4%

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

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

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

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

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

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

    if 3.20000000000000011e-307 < b < 2.4999999999999998e-255

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.6 \cdot 10^{+55}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 3.2 \cdot 10^{-307}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{-255}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.26 \cdot 10^{+88}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 66.6% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq 1.85 \cdot 10^{+22}:\\
\;\;\;\;x + \left(a + t\_1\right)\\

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

\mathbf{elif}\;t \leq 3.1 \cdot 10^{+87}:\\
\;\;\;\;x + t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.5000000000000001e43 or 3.1e87 < t

    1. Initial program 90.8%

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

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

    if -3.5000000000000001e43 < t < 1.8499999999999999e22

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

    if 1.8499999999999999e22 < t < 2.69999999999999992e51

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

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

        \[\leadsto \color{blue}{\left(-a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. distribute-rgt-neg-in90.5%

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

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

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

    if 2.69999999999999992e51 < t < 3.1e87

    1. Initial program 99.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.5 \cdot 10^{+43}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{+22}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+51}:\\ \;\;\;\;y \cdot b - t \cdot a\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+87}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 67.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq 10^{+22}:\\
\;\;\;\;x + \left(a + t\_1\right)\\

\mathbf{elif}\;t \leq 9.5 \cdot 10^{+50}:\\
\;\;\;\;y \cdot b - t \cdot a\\

\mathbf{elif}\;t \leq 3.4 \cdot 10^{+87}:\\
\;\;\;\;x + t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -8e3

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

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

        \[\leadsto \color{blue}{\left(-a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. distribute-rgt-neg-in77.0%

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

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

    if -8e3 < t < 1e22

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

    if 1e22 < t < 9.4999999999999993e50

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

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

        \[\leadsto \color{blue}{\left(-a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. distribute-rgt-neg-in90.5%

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

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

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

    if 9.4999999999999993e50 < t < 3.4000000000000002e87

    1. Initial program 99.8%

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

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

    if 3.4000000000000002e87 < t

    1. Initial program 84.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 71.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8000:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) - t \cdot a\\ \mathbf{elif}\;t \leq 10^{+22}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+50}:\\ \;\;\;\;y \cdot b - t \cdot a\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{+87}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 40.1% accurate, 0.8× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.4e41 or 5.4999999999999998e111 < a

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

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

    if -1.4e41 < a < -2.19999999999999991e-20

    1. Initial program 92.3%

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

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

        \[\leadsto \color{blue}{\left(-a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. distribute-rgt-neg-in62.7%

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

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

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

    if -2.19999999999999991e-20 < a < 1.64999999999999993e-285

    1. Initial program 95.6%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv42.2%

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

        \[\leadsto x + \color{blue}{1} \cdot z \]
      3. *-lft-identity42.2%

        \[\leadsto x + \color{blue}{z} \]
    7. Simplified42.2%

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

    if 1.64999999999999993e-285 < a < 5.4999999999999998e111

    1. Initial program 96.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{+41}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{-20}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-285}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+111}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 85.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;b \leq -5.2 \cdot 10^{-86} \lor \neg \left(b \leq 3.3 \cdot 10^{+44}\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 -5.2e-86) (not (<= b 3.3e+44)))
     (+ (+ 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 <= -5.2e-86) || !(b <= 3.3e+44)) {
		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 <= (-5.2d-86)) .or. (.not. (b <= 3.3d+44))) 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 <= -5.2e-86) || !(b <= 3.3e+44)) {
		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 <= -5.2e-86) or not (b <= 3.3e+44):
		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 <= -5.2e-86) || !(b <= 3.3e+44))
		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 <= -5.2e-86) || ~((b <= 3.3e+44)))
		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, -5.2e-86], N[Not[LessEqual[b, 3.3e+44]], $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 -5.2 \cdot 10^{-86} \lor \neg \left(b \leq 3.3 \cdot 10^{+44}\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 < -5.2000000000000002e-86 or 3.30000000000000013e44 < b

    1. Initial program 90.3%

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

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

    if -5.2000000000000002e-86 < b < 3.30000000000000013e44

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{-86} \lor \neg \left(b \leq 3.3 \cdot 10^{+44}\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 15: 33.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(-t\right)\\ \mathbf{if}\;t \leq -8.5 \cdot 10^{+273}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{+250}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-14} \lor \neg \left(t \leq 1.42 \cdot 10^{+77}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- t))))
   (if (<= t -8.5e+273)
     t_1
     (if (<= t -2.4e+250)
       (* t b)
       (if (or (<= t -1.05e-14) (not (<= t 1.42e+77))) t_1 (+ x z))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * -t;
	double tmp;
	if (t <= -8.5e+273) {
		tmp = t_1;
	} else if (t <= -2.4e+250) {
		tmp = t * b;
	} else if ((t <= -1.05e-14) || !(t <= 1.42e+77)) {
		tmp = t_1;
	} else {
		tmp = x + z;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = a * -t
    if (t <= (-8.5d+273)) then
        tmp = t_1
    else if (t <= (-2.4d+250)) then
        tmp = t * b
    else if ((t <= (-1.05d-14)) .or. (.not. (t <= 1.42d+77))) then
        tmp = t_1
    else
        tmp = x + z
    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 * -t;
	double tmp;
	if (t <= -8.5e+273) {
		tmp = t_1;
	} else if (t <= -2.4e+250) {
		tmp = t * b;
	} else if ((t <= -1.05e-14) || !(t <= 1.42e+77)) {
		tmp = t_1;
	} else {
		tmp = x + z;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * -t
	tmp = 0
	if t <= -8.5e+273:
		tmp = t_1
	elif t <= -2.4e+250:
		tmp = t * b
	elif (t <= -1.05e-14) or not (t <= 1.42e+77):
		tmp = t_1
	else:
		tmp = x + z
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(-t))
	tmp = 0.0
	if (t <= -8.5e+273)
		tmp = t_1;
	elseif (t <= -2.4e+250)
		tmp = Float64(t * b);
	elseif ((t <= -1.05e-14) || !(t <= 1.42e+77))
		tmp = t_1;
	else
		tmp = Float64(x + z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * -t;
	tmp = 0.0;
	if (t <= -8.5e+273)
		tmp = t_1;
	elseif (t <= -2.4e+250)
		tmp = t * b;
	elseif ((t <= -1.05e-14) || ~((t <= 1.42e+77)))
		tmp = t_1;
	else
		tmp = x + z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * (-t)), $MachinePrecision]}, If[LessEqual[t, -8.5e+273], t$95$1, If[LessEqual[t, -2.4e+250], N[(t * b), $MachinePrecision], If[Or[LessEqual[t, -1.05e-14], N[Not[LessEqual[t, 1.42e+77]], $MachinePrecision]], t$95$1, N[(x + z), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -2.4 \cdot 10^{+250}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;t \leq -1.05 \cdot 10^{-14} \lor \neg \left(t \leq 1.42 \cdot 10^{+77}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.5000000000000002e273 or -2.40000000000000013e250 < t < -1.0499999999999999e-14 or 1.41999999999999993e77 < t

    1. Initial program 92.0%

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

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

        \[\leadsto \color{blue}{\left(-a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. distribute-rgt-neg-in71.5%

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

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

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

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

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

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

    if -8.5000000000000002e273 < t < -2.40000000000000013e250

    1. Initial program 90.0%

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

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

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

        \[\leadsto \color{blue}{t \cdot b} \]
    6. Simplified71.7%

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

    if -1.0499999999999999e-14 < t < 1.41999999999999993e77

    1. Initial program 98.4%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv32.9%

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

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

        \[\leadsto x + \color{blue}{z} \]
    7. Simplified32.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.5 \cdot 10^{+273}:\\ \;\;\;\;a \cdot \left(-t\right)\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{+250}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-14} \lor \neg \left(t \leq 1.42 \cdot 10^{+77}\right):\\ \;\;\;\;a \cdot \left(-t\right)\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 49.2% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.0000000000000001e47 or 6.49999999999999998e58 < y

    1. Initial program 93.0%

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

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

    if -2.0000000000000001e47 < y < 2.50000000000000017e-190

    1. Initial program 96.9%

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

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

    if 2.50000000000000017e-190 < y < 6.49999999999999998e58

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2 \cdot 10^{+47}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-190}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+58}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 26.5% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq -2.8 \cdot 10^{-52}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;t \leq 8.5 \cdot 10^{+63}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.05e68 or 8.5000000000000004e63 < t

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

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

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

        \[\leadsto \color{blue}{t \cdot b} \]
    6. Simplified31.2%

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

    if -1.05e68 < t < -2.79999999999999995e-52

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

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

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

        \[\leadsto \color{blue}{y \cdot b} \]
    6. Simplified23.7%

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

    if -2.79999999999999995e-52 < t < 8.5000000000000004e63

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+68}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-52}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{+63}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 56.9% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -950000 \lor \neg \left(t \leq 3500\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.5e5 or 3500 < 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 65.8%

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

    if -9.5e5 < t < 3500

    1. Initial program 99.1%

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

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

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

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

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

Alternative 19: 26.3% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.7 \lor \neg \left(t \leq 9.5 \cdot 10^{+61}\right):\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.69999999999999996 or 9.49999999999999959e61 < t

    1. Initial program 92.1%

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

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

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

        \[\leadsto \color{blue}{t \cdot b} \]
    6. Simplified27.4%

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

    if -1.69999999999999996 < t < 9.49999999999999959e61

    1. Initial program 98.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.7 \lor \neg \left(t \leq 9.5 \cdot 10^{+61}\right):\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 34.6% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{+82} \lor \neg \left(y \leq 2.2 \cdot 10^{+89}\right):\\
\;\;\;\;y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.39999999999999994e82 or 2.2e89 < y

    1. Initial program 91.7%

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

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

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

        \[\leadsto \color{blue}{y \cdot b} \]
    6. Simplified34.3%

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

    if -3.39999999999999994e82 < y < 2.2e89

    1. Initial program 97.5%

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

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

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

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

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

        \[\leadsto x + \color{blue}{z} \]
    7. Simplified29.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+82} \lor \neg \left(y \leq 2.2 \cdot 10^{+89}\right):\\ \;\;\;\;y \cdot b\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 17.6% accurate, 2.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.7 \cdot 10^{+34}:\\
\;\;\;\;x\\

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


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

    1. Initial program 98.1%

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

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

    if 2.7e34 < b

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

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

        \[\leadsto \color{blue}{\left(-a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. distribute-rgt-neg-in68.3%

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

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

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

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

        \[\leadsto \color{blue}{b \cdot -2} \]
    9. Simplified20.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.7 \cdot 10^{+34}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 16.0% accurate, 21.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
def code(x, y, z, t, a, b):
	return x
function code(x, y, z, t, a, b)
	return x
end
function tmp = code(x, y, z, t, a, b)
	tmp = x;
end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 95.3%

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification14.3%

    \[\leadsto x \]
  5. Add Preprocessing

Reproduce

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