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

Percentage Accurate: 95.4% → 97.1%
Time: 12.8s
Alternatives: 16
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 16 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.4% accurate, 1.0× speedup?

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

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

Alternative 1: 97.1% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.56 \cdot 10^{+192}:\\
\;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\

\mathbf{else}:\\
\;\;\;\;\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}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.56e192

    1. Initial program 70.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 inf 95.8%

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

    if -1.56e192 < b

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.56 \cdot 10^{+192}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;\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} \]
  5. Add Preprocessing

Alternative 2: 98.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(\left(t + y\right) - 2\right) + \left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right)\\ \mathbf{if}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1
         (+ (* b (- (+ t y) 2.0)) (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))))))
   (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 = (b * ((t + y) - 2.0)) + ((x + (z * (1.0 - y))) + (a * (1.0 - t)));
	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 = (b * ((t + y) - 2.0)) + ((x + (z * (1.0 - y))) + (a * (1.0 - t)));
	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 = (b * ((t + y) - 2.0)) + ((x + (z * (1.0 - y))) + (a * (1.0 - t)))
	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(b * Float64(Float64(t + y) - 2.0)) + Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(a * Float64(1.0 - t))))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(t * Float64(b - a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (b * ((t + y) - 2.0)) + ((x + (z * (1.0 - y))) + (a * (1.0 - t)));
	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[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


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

    1. Initial program 100.0%

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

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

    1. Initial program 0.0%

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

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

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

Alternative 3: 60.2% accurate, 0.8× speedup?

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

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

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

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

\mathbf{elif}\;b \leq 1.62 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.9999999999999999e29 or 1.6200000000000001e47 < b

    1. Initial program 86.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 inf 77.1%

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

    if -2.9999999999999999e29 < b < -1.5e-68 or -6.7999999999999995e-166 < b < 1.6200000000000001e47

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

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

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

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

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

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

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

    if -1.5e-68 < b < -6.7999999999999995e-166

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3 \cdot 10^{+29}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;b \leq -1.5 \cdot 10^{-68}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq -6.8 \cdot 10^{-166}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.62 \cdot 10^{+47}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 35.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ t_2 := z \cdot \left(-y\right)\\ \mathbf{if}\;y \leq -7.6 \cdot 10^{+56}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 2.35 \cdot 10^{-204}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{-151}:\\ \;\;\;\;b \cdot t\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+64}:\\ \;\;\;\;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 (* z (- y))))
   (if (<= y -7.6e+56)
     t_2
     (if (<= y 2.35e-204)
       t_1
       (if (<= y 4.4e-151) (* b t) (if (<= y 7.2e+64) 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 = z * -y;
	double tmp;
	if (y <= -7.6e+56) {
		tmp = t_2;
	} else if (y <= 2.35e-204) {
		tmp = t_1;
	} else if (y <= 4.4e-151) {
		tmp = b * t;
	} else if (y <= 7.2e+64) {
		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 = z * -y
    if (y <= (-7.6d+56)) then
        tmp = t_2
    else if (y <= 2.35d-204) then
        tmp = t_1
    else if (y <= 4.4d-151) then
        tmp = b * t
    else if (y <= 7.2d+64) 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 = z * -y;
	double tmp;
	if (y <= -7.6e+56) {
		tmp = t_2;
	} else if (y <= 2.35e-204) {
		tmp = t_1;
	} else if (y <= 4.4e-151) {
		tmp = b * t;
	} else if (y <= 7.2e+64) {
		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 = z * -y
	tmp = 0
	if y <= -7.6e+56:
		tmp = t_2
	elif y <= 2.35e-204:
		tmp = t_1
	elif y <= 4.4e-151:
		tmp = b * t
	elif y <= 7.2e+64:
		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(z * Float64(-y))
	tmp = 0.0
	if (y <= -7.6e+56)
		tmp = t_2;
	elseif (y <= 2.35e-204)
		tmp = t_1;
	elseif (y <= 4.4e-151)
		tmp = Float64(b * t);
	elseif (y <= 7.2e+64)
		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 = z * -y;
	tmp = 0.0;
	if (y <= -7.6e+56)
		tmp = t_2;
	elseif (y <= 2.35e-204)
		tmp = t_1;
	elseif (y <= 4.4e-151)
		tmp = b * t;
	elseif (y <= 7.2e+64)
		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[(z * (-y)), $MachinePrecision]}, If[LessEqual[y, -7.6e+56], t$95$2, If[LessEqual[y, 2.35e-204], t$95$1, If[LessEqual[y, 4.4e-151], N[(b * t), $MachinePrecision], If[LessEqual[y, 7.2e+64], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 2.35 \cdot 10^{-204}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 4.4 \cdot 10^{-151}:\\
\;\;\;\;b \cdot t\\

\mathbf{elif}\;y \leq 7.2 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.59999999999999991e56 or 7.20000000000000027e64 < y

    1. Initial program 92.0%

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

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. *-commutative48.1%

        \[\leadsto -\color{blue}{z \cdot y} \]
      3. distribute-rgt-neg-in48.1%

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

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

    if -7.59999999999999991e56 < y < 2.34999999999999996e-204 or 4.3999999999999999e-151 < y < 7.20000000000000027e64

    1. Initial program 93.9%

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

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

    if 2.34999999999999996e-204 < y < 4.3999999999999999e-151

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.6 \cdot 10^{+56}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq 2.35 \cdot 10^{-204}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{-151}:\\ \;\;\;\;b \cdot t\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+64}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 35.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ t_2 := z \cdot \left(-y\right)\\ \mathbf{if}\;y \leq -2.8 \cdot 10^{+50}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{-300}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{-147}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 5 \cdot 10^{+62}:\\ \;\;\;\;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 (* z (- y))))
   (if (<= y -2.8e+50)
     t_2
     (if (<= y -1.85e-300)
       t_1
       (if (<= y 1.3e-147) (* b (- t 2.0)) (if (<= y 5e+62) 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 = z * -y;
	double tmp;
	if (y <= -2.8e+50) {
		tmp = t_2;
	} else if (y <= -1.85e-300) {
		tmp = t_1;
	} else if (y <= 1.3e-147) {
		tmp = b * (t - 2.0);
	} else if (y <= 5e+62) {
		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 = z * -y
    if (y <= (-2.8d+50)) then
        tmp = t_2
    else if (y <= (-1.85d-300)) then
        tmp = t_1
    else if (y <= 1.3d-147) then
        tmp = b * (t - 2.0d0)
    else if (y <= 5d+62) 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 = z * -y;
	double tmp;
	if (y <= -2.8e+50) {
		tmp = t_2;
	} else if (y <= -1.85e-300) {
		tmp = t_1;
	} else if (y <= 1.3e-147) {
		tmp = b * (t - 2.0);
	} else if (y <= 5e+62) {
		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 = z * -y
	tmp = 0
	if y <= -2.8e+50:
		tmp = t_2
	elif y <= -1.85e-300:
		tmp = t_1
	elif y <= 1.3e-147:
		tmp = b * (t - 2.0)
	elif y <= 5e+62:
		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(z * Float64(-y))
	tmp = 0.0
	if (y <= -2.8e+50)
		tmp = t_2;
	elseif (y <= -1.85e-300)
		tmp = t_1;
	elseif (y <= 1.3e-147)
		tmp = Float64(b * Float64(t - 2.0));
	elseif (y <= 5e+62)
		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 = z * -y;
	tmp = 0.0;
	if (y <= -2.8e+50)
		tmp = t_2;
	elseif (y <= -1.85e-300)
		tmp = t_1;
	elseif (y <= 1.3e-147)
		tmp = b * (t - 2.0);
	elseif (y <= 5e+62)
		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[(z * (-y)), $MachinePrecision]}, If[LessEqual[y, -2.8e+50], t$95$2, If[LessEqual[y, -1.85e-300], t$95$1, If[LessEqual[y, 1.3e-147], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e+62], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.85 \cdot 10^{-300}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 5 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.7999999999999998e50 or 5.00000000000000029e62 < y

    1. Initial program 92.0%

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

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. *-commutative48.1%

        \[\leadsto -\color{blue}{z \cdot y} \]
      3. distribute-rgt-neg-in48.1%

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

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

    if -2.7999999999999998e50 < y < -1.8500000000000001e-300 or 1.2999999999999999e-147 < y < 5.00000000000000029e62

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

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

    if -1.8500000000000001e-300 < y < 1.2999999999999999e-147

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.8 \cdot 10^{+50}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{-300}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{-147}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 5 \cdot 10^{+62}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 86.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := z \cdot \left(1 - y\right)\\
\mathbf{if}\;b \leq -2.6 \cdot 10^{+28} \lor \neg \left(b \leq 2.4 \cdot 10^{+34}\right):\\
\;\;\;\;\left(b \cdot \left(\left(t + y\right) - 2\right) + x\right) + t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.6000000000000002e28 or 2.39999999999999987e34 < b

    1. Initial program 87.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 a around 0 86.0%

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

    if -2.6000000000000002e28 < b < 2.39999999999999987e34

    1. Initial program 98.5%

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

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

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

Alternative 7: 80.8% accurate, 0.9× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1 - y \cdot z\\


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

    1. Initial program 87.7%

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

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

    if -2.22e30 < b < 6.5000000000000001e123

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

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

    if 6.5000000000000001e123 < b

    1. Initial program 85.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 80.5%

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

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

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

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

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

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

Alternative 8: 50.7% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.80000000000000035e38 or 4.2000000000000002e26 < t

    1. Initial program 87.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 72.7%

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

    if -4.80000000000000035e38 < t < 5.5999999999999998e-122

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

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

    if 5.5999999999999998e-122 < t < 4.2000000000000002e26

    1. Initial program 99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{+38}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-122}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{+26}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 63.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+144} \lor \neg \left(y \leq 6.5 \cdot 10^{+53}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.99999999999999935e144 or 6.50000000000000017e53 < y

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

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

    if -8.99999999999999935e144 < y < 6.50000000000000017e53

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

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

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

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

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

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

        \[\leadsto \left(z + b \cdot \color{blue}{\left(t + \left(-2\right)\right)}\right) + x \]
      3. metadata-eval63.6%

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

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

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

Alternative 10: 25.6% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;b \leq -7 \cdot 10^{-166}:\\
\;\;\;\;a\\

\mathbf{elif}\;b \leq 10^{+30}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -6.30000000000000003e47 or 1e30 < b

    1. Initial program 87.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 43.2%

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

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

    if -6.30000000000000003e47 < b < -6.9999999999999998e-166

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

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

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

    if -6.9999999999999998e-166 < b < 1e30

    1. Initial program 99.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.3 \cdot 10^{+47}:\\ \;\;\;\;b \cdot t\\ \mathbf{elif}\;b \leq -7 \cdot 10^{-166}:\\ \;\;\;\;a\\ \mathbf{elif}\;b \leq 10^{+30}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;b \cdot t\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 41.9% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{+38} \lor \neg \left(t \leq 1.05 \cdot 10^{+26}\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.3e38 or 1.05e26 < t

    1. Initial program 87.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 72.7%

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

    if -1.3e38 < t < 1.05e26

    1. Initial program 97.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 50.2%

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. *-commutative29.0%

        \[\leadsto -\color{blue}{z \cdot y} \]
      3. distribute-rgt-neg-in29.0%

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

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

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

Alternative 12: 50.8% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+63} \lor \neg \left(y \leq 1.6 \cdot 10^{+57}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.19999999999999985e63 or 1.60000000000000015e57 < y

    1. Initial program 92.0%

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

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

    if -8.19999999999999985e63 < y < 1.60000000000000015e57

    1. Initial program 94.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{+63} \lor \neg \left(y \leq 1.6 \cdot 10^{+57}\right):\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 27.1% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.4 \cdot 10^{+116} \lor \neg \left(t \leq 2.05 \cdot 10^{+26}\right):\\
\;\;\;\;b \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.4000000000000007e116 or 2.04999999999999992e26 < t

    1. Initial program 85.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 77.8%

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

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

    if -9.4000000000000007e116 < t < 2.04999999999999992e26

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

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. *-commutative29.7%

        \[\leadsto -\color{blue}{z \cdot y} \]
      3. distribute-rgt-neg-in29.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.4 \cdot 10^{+116} \lor \neg \left(t \leq 2.05 \cdot 10^{+26}\right):\\ \;\;\;\;b \cdot t\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 28.7% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{+117} \lor \neg \left(t \leq 4.4 \cdot 10^{+32}\right):\\
\;\;\;\;t \cdot \left(-a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.20000000000000014e117 or 4.40000000000000002e32 < t

    1. Initial program 85.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 a around inf 47.7%

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

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

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

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

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

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

    if -2.20000000000000014e117 < t < 4.40000000000000002e32

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

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. *-commutative29.2%

        \[\leadsto -\color{blue}{z \cdot y} \]
      3. distribute-rgt-neg-in29.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.2 \cdot 10^{+117} \lor \neg \left(t \leq 4.4 \cdot 10^{+32}\right):\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 21.6% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;x \leq 8.8 \cdot 10^{+116}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.59999999999999932e91 or 8.799999999999999e116 < x

    1. Initial program 94.2%

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

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

    if -9.59999999999999932e91 < x < 8.799999999999999e116

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.6 \cdot 10^{+91}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 8.8 \cdot 10^{+116}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 11.2% accurate, 21.0× speedup?

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

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

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

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

    \[\leadsto a \]
  6. Add Preprocessing

Reproduce

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