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

Percentage Accurate: 95.1% → 97.7%
Time: 21.5s
Alternatives: 27
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 27 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.1% 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.7% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

Alternative 2: 97.6% 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 97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\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: 32.9% accurate, 0.4× 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 -4 \cdot 10^{+73}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.4 \cdot 10^{-88}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq -1.05 \cdot 10^{-214}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4.7 \cdot 10^{-265}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-185}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-130}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{+18}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+108}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+133}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- 1.0 t))) (t_2 (* z (- y))))
   (if (<= y -4e+73)
     t_2
     (if (<= y -1.4e-88)
       (+ x a)
       (if (<= y -1.05e-214)
         t_1
         (if (<= y -4.7e-265)
           (+ x a)
           (if (<= y 5.8e-185)
             (* t b)
             (if (<= y 1.4e-130)
               z
               (if (<= y 3.3e+18)
                 t_1
                 (if (<= y 1.1e+108)
                   t_2
                   (if (<= y 2.2e+133) t_1 (* y b))))))))))))
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 <= -4e+73) {
		tmp = t_2;
	} else if (y <= -1.4e-88) {
		tmp = x + a;
	} else if (y <= -1.05e-214) {
		tmp = t_1;
	} else if (y <= -4.7e-265) {
		tmp = x + a;
	} else if (y <= 5.8e-185) {
		tmp = t * b;
	} else if (y <= 1.4e-130) {
		tmp = z;
	} else if (y <= 3.3e+18) {
		tmp = t_1;
	} else if (y <= 1.1e+108) {
		tmp = t_2;
	} else if (y <= 2.2e+133) {
		tmp = t_1;
	} else {
		tmp = y * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = a * (1.0d0 - t)
    t_2 = z * -y
    if (y <= (-4d+73)) then
        tmp = t_2
    else if (y <= (-1.4d-88)) then
        tmp = x + a
    else if (y <= (-1.05d-214)) then
        tmp = t_1
    else if (y <= (-4.7d-265)) then
        tmp = x + a
    else if (y <= 5.8d-185) then
        tmp = t * b
    else if (y <= 1.4d-130) then
        tmp = z
    else if (y <= 3.3d+18) then
        tmp = t_1
    else if (y <= 1.1d+108) then
        tmp = t_2
    else if (y <= 2.2d+133) then
        tmp = t_1
    else
        tmp = y * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double t_2 = z * -y;
	double tmp;
	if (y <= -4e+73) {
		tmp = t_2;
	} else if (y <= -1.4e-88) {
		tmp = x + a;
	} else if (y <= -1.05e-214) {
		tmp = t_1;
	} else if (y <= -4.7e-265) {
		tmp = x + a;
	} else if (y <= 5.8e-185) {
		tmp = t * b;
	} else if (y <= 1.4e-130) {
		tmp = z;
	} else if (y <= 3.3e+18) {
		tmp = t_1;
	} else if (y <= 1.1e+108) {
		tmp = t_2;
	} else if (y <= 2.2e+133) {
		tmp = t_1;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	t_2 = z * -y
	tmp = 0
	if y <= -4e+73:
		tmp = t_2
	elif y <= -1.4e-88:
		tmp = x + a
	elif y <= -1.05e-214:
		tmp = t_1
	elif y <= -4.7e-265:
		tmp = x + a
	elif y <= 5.8e-185:
		tmp = t * b
	elif y <= 1.4e-130:
		tmp = z
	elif y <= 3.3e+18:
		tmp = t_1
	elif y <= 1.1e+108:
		tmp = t_2
	elif y <= 2.2e+133:
		tmp = t_1
	else:
		tmp = y * b
	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 <= -4e+73)
		tmp = t_2;
	elseif (y <= -1.4e-88)
		tmp = Float64(x + a);
	elseif (y <= -1.05e-214)
		tmp = t_1;
	elseif (y <= -4.7e-265)
		tmp = Float64(x + a);
	elseif (y <= 5.8e-185)
		tmp = Float64(t * b);
	elseif (y <= 1.4e-130)
		tmp = z;
	elseif (y <= 3.3e+18)
		tmp = t_1;
	elseif (y <= 1.1e+108)
		tmp = t_2;
	elseif (y <= 2.2e+133)
		tmp = t_1;
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (1.0 - t);
	t_2 = z * -y;
	tmp = 0.0;
	if (y <= -4e+73)
		tmp = t_2;
	elseif (y <= -1.4e-88)
		tmp = x + a;
	elseif (y <= -1.05e-214)
		tmp = t_1;
	elseif (y <= -4.7e-265)
		tmp = x + a;
	elseif (y <= 5.8e-185)
		tmp = t * b;
	elseif (y <= 1.4e-130)
		tmp = z;
	elseif (y <= 3.3e+18)
		tmp = t_1;
	elseif (y <= 1.1e+108)
		tmp = t_2;
	elseif (y <= 2.2e+133)
		tmp = t_1;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * (-y)), $MachinePrecision]}, If[LessEqual[y, -4e+73], t$95$2, If[LessEqual[y, -1.4e-88], N[(x + a), $MachinePrecision], If[LessEqual[y, -1.05e-214], t$95$1, If[LessEqual[y, -4.7e-265], N[(x + a), $MachinePrecision], If[LessEqual[y, 5.8e-185], N[(t * b), $MachinePrecision], If[LessEqual[y, 1.4e-130], z, If[LessEqual[y, 3.3e+18], t$95$1, If[LessEqual[y, 1.1e+108], t$95$2, If[LessEqual[y, 2.2e+133], t$95$1, N[(y * b), $MachinePrecision]]]]]]]]]]]]
\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 -4 \cdot 10^{+73}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -1.4 \cdot 10^{-88}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;y \leq -1.05 \cdot 10^{-214}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -4.7 \cdot 10^{-265}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;y \leq 5.8 \cdot 10^{-185}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;y \leq 1.4 \cdot 10^{-130}:\\
\;\;\;\;z\\

\mathbf{elif}\;y \leq 3.3 \cdot 10^{+18}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 1.1 \cdot 10^{+108}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 2.2 \cdot 10^{+133}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -3.99999999999999993e73 or 3.3e18 < y < 1.1000000000000001e108

    1. Initial program 93.7%

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

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

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

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

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

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

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

    if -3.99999999999999993e73 < y < -1.39999999999999988e-88 or -1.04999999999999996e-214 < y < -4.69999999999999986e-265

    1. Initial program 100.0%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{a} \]
      4. +-commutative43.8%

        \[\leadsto \color{blue}{a + x} \]
    7. Simplified43.8%

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

    if -1.39999999999999988e-88 < y < -1.04999999999999996e-214 or 1.40000000000000008e-130 < y < 3.3e18 or 1.1000000000000001e108 < y < 2.2e133

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

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

    if -4.69999999999999986e-265 < y < 5.79999999999999989e-185

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.79999999999999989e-185 < y < 1.40000000000000008e-130

    1. Initial program 100.0%

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

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

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

    if 2.2e133 < y

    1. Initial program 97.2%

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

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

      \[\leadsto \color{blue}{b \cdot y} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification47.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{+73}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq -1.4 \cdot 10^{-88}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq -1.05 \cdot 10^{-214}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -4.7 \cdot 10^{-265}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-185}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-130}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{+18}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+108}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+133}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 97.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \left(\left(x - \left(y + -1\right) \cdot z\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}:\\
\;\;\;\;y \cdot \left(b - z\right)\\


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

    1. Initial program 100.0%

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

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

    1. Initial program 0.0%

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

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

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

Alternative 5: 34.4% accurate, 0.5× 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 -4.35 \cdot 10^{+71}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-164}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-179}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-133}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 1.28 \cdot 10^{+17}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{+107}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+133}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- 1.0 t))) (t_2 (* z (- y))))
   (if (<= y -4.35e+71)
     t_2
     (if (<= y -3e-164)
       (+ x a)
       (if (<= y 4.5e-179)
         (* b (- t 2.0))
         (if (<= y 1.25e-133)
           z
           (if (<= y 1.28e+17)
             t_1
             (if (<= y 3.7e+107) t_2 (if (<= y 4e+133) t_1 (* y b))))))))))
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 <= -4.35e+71) {
		tmp = t_2;
	} else if (y <= -3e-164) {
		tmp = x + a;
	} else if (y <= 4.5e-179) {
		tmp = b * (t - 2.0);
	} else if (y <= 1.25e-133) {
		tmp = z;
	} else if (y <= 1.28e+17) {
		tmp = t_1;
	} else if (y <= 3.7e+107) {
		tmp = t_2;
	} else if (y <= 4e+133) {
		tmp = t_1;
	} else {
		tmp = y * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = a * (1.0d0 - t)
    t_2 = z * -y
    if (y <= (-4.35d+71)) then
        tmp = t_2
    else if (y <= (-3d-164)) then
        tmp = x + a
    else if (y <= 4.5d-179) then
        tmp = b * (t - 2.0d0)
    else if (y <= 1.25d-133) then
        tmp = z
    else if (y <= 1.28d+17) then
        tmp = t_1
    else if (y <= 3.7d+107) then
        tmp = t_2
    else if (y <= 4d+133) then
        tmp = t_1
    else
        tmp = y * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double t_2 = z * -y;
	double tmp;
	if (y <= -4.35e+71) {
		tmp = t_2;
	} else if (y <= -3e-164) {
		tmp = x + a;
	} else if (y <= 4.5e-179) {
		tmp = b * (t - 2.0);
	} else if (y <= 1.25e-133) {
		tmp = z;
	} else if (y <= 1.28e+17) {
		tmp = t_1;
	} else if (y <= 3.7e+107) {
		tmp = t_2;
	} else if (y <= 4e+133) {
		tmp = t_1;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	t_2 = z * -y
	tmp = 0
	if y <= -4.35e+71:
		tmp = t_2
	elif y <= -3e-164:
		tmp = x + a
	elif y <= 4.5e-179:
		tmp = b * (t - 2.0)
	elif y <= 1.25e-133:
		tmp = z
	elif y <= 1.28e+17:
		tmp = t_1
	elif y <= 3.7e+107:
		tmp = t_2
	elif y <= 4e+133:
		tmp = t_1
	else:
		tmp = y * b
	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 <= -4.35e+71)
		tmp = t_2;
	elseif (y <= -3e-164)
		tmp = Float64(x + a);
	elseif (y <= 4.5e-179)
		tmp = Float64(b * Float64(t - 2.0));
	elseif (y <= 1.25e-133)
		tmp = z;
	elseif (y <= 1.28e+17)
		tmp = t_1;
	elseif (y <= 3.7e+107)
		tmp = t_2;
	elseif (y <= 4e+133)
		tmp = t_1;
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (1.0 - t);
	t_2 = z * -y;
	tmp = 0.0;
	if (y <= -4.35e+71)
		tmp = t_2;
	elseif (y <= -3e-164)
		tmp = x + a;
	elseif (y <= 4.5e-179)
		tmp = b * (t - 2.0);
	elseif (y <= 1.25e-133)
		tmp = z;
	elseif (y <= 1.28e+17)
		tmp = t_1;
	elseif (y <= 3.7e+107)
		tmp = t_2;
	elseif (y <= 4e+133)
		tmp = t_1;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * (-y)), $MachinePrecision]}, If[LessEqual[y, -4.35e+71], t$95$2, If[LessEqual[y, -3e-164], N[(x + a), $MachinePrecision], If[LessEqual[y, 4.5e-179], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e-133], z, If[LessEqual[y, 1.28e+17], t$95$1, If[LessEqual[y, 3.7e+107], t$95$2, If[LessEqual[y, 4e+133], t$95$1, N[(y * b), $MachinePrecision]]]]]]]]]]
\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 -4.35 \cdot 10^{+71}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -3 \cdot 10^{-164}:\\
\;\;\;\;x + a\\

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

\mathbf{elif}\;y \leq 1.25 \cdot 10^{-133}:\\
\;\;\;\;z\\

\mathbf{elif}\;y \leq 1.28 \cdot 10^{+17}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 4 \cdot 10^{+133}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -4.3499999999999999e71 or 1.28e17 < y < 3.7e107

    1. Initial program 93.7%

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

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

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

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

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

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

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

    if -4.3499999999999999e71 < y < -3.0000000000000001e-164

    1. Initial program 98.0%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{a} \]
      4. +-commutative39.2%

        \[\leadsto \color{blue}{a + x} \]
    7. Simplified39.2%

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

    if -3.0000000000000001e-164 < y < 4.49999999999999992e-179

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

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

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

    if 4.49999999999999992e-179 < y < 1.25e-133

    1. Initial program 100.0%

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

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

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

    if 1.25e-133 < y < 1.28e17 or 3.7e107 < y < 4.0000000000000001e133

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

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

    if 4.0000000000000001e133 < y

    1. Initial program 97.2%

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

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

      \[\leadsto \color{blue}{b \cdot y} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification50.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.35 \cdot 10^{+71}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-164}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-179}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-133}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 1.28 \cdot 10^{+17}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{+107}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+133}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 52.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - t \cdot a\\ t_2 := y \cdot \left(b - z\right)\\ t_3 := x + \left(z + a\right)\\ \mathbf{if}\;y \leq -7.5 \cdot 10^{+72}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -2 \cdot 10^{+52}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -125000000:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -1.45 \cdot 10^{-90}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-265}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-186}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 500000000:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- x (* t a))) (t_2 (* y (- b z))) (t_3 (+ x (+ z a))))
   (if (<= y -7.5e+72)
     t_2
     (if (<= y -2e+52)
       t_1
       (if (<= y -125000000.0)
         (* t (- b a))
         (if (<= y -1.45e-90)
           t_3
           (if (<= y -4e-265)
             t_1
             (if (<= y 1.8e-186)
               (* b (- t 2.0))
               (if (<= y 500000000.0) t_3 t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (t * a);
	double t_2 = y * (b - z);
	double t_3 = x + (z + a);
	double tmp;
	if (y <= -7.5e+72) {
		tmp = t_2;
	} else if (y <= -2e+52) {
		tmp = t_1;
	} else if (y <= -125000000.0) {
		tmp = t * (b - a);
	} else if (y <= -1.45e-90) {
		tmp = t_3;
	} else if (y <= -4e-265) {
		tmp = t_1;
	} else if (y <= 1.8e-186) {
		tmp = b * (t - 2.0);
	} else if (y <= 500000000.0) {
		tmp = t_3;
	} 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) :: t_3
    real(8) :: tmp
    t_1 = x - (t * a)
    t_2 = y * (b - z)
    t_3 = x + (z + a)
    if (y <= (-7.5d+72)) then
        tmp = t_2
    else if (y <= (-2d+52)) then
        tmp = t_1
    else if (y <= (-125000000.0d0)) then
        tmp = t * (b - a)
    else if (y <= (-1.45d-90)) then
        tmp = t_3
    else if (y <= (-4d-265)) then
        tmp = t_1
    else if (y <= 1.8d-186) then
        tmp = b * (t - 2.0d0)
    else if (y <= 500000000.0d0) then
        tmp = t_3
    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 - (t * a);
	double t_2 = y * (b - z);
	double t_3 = x + (z + a);
	double tmp;
	if (y <= -7.5e+72) {
		tmp = t_2;
	} else if (y <= -2e+52) {
		tmp = t_1;
	} else if (y <= -125000000.0) {
		tmp = t * (b - a);
	} else if (y <= -1.45e-90) {
		tmp = t_3;
	} else if (y <= -4e-265) {
		tmp = t_1;
	} else if (y <= 1.8e-186) {
		tmp = b * (t - 2.0);
	} else if (y <= 500000000.0) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x - (t * a)
	t_2 = y * (b - z)
	t_3 = x + (z + a)
	tmp = 0
	if y <= -7.5e+72:
		tmp = t_2
	elif y <= -2e+52:
		tmp = t_1
	elif y <= -125000000.0:
		tmp = t * (b - a)
	elif y <= -1.45e-90:
		tmp = t_3
	elif y <= -4e-265:
		tmp = t_1
	elif y <= 1.8e-186:
		tmp = b * (t - 2.0)
	elif y <= 500000000.0:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x - Float64(t * a))
	t_2 = Float64(y * Float64(b - z))
	t_3 = Float64(x + Float64(z + a))
	tmp = 0.0
	if (y <= -7.5e+72)
		tmp = t_2;
	elseif (y <= -2e+52)
		tmp = t_1;
	elseif (y <= -125000000.0)
		tmp = Float64(t * Float64(b - a));
	elseif (y <= -1.45e-90)
		tmp = t_3;
	elseif (y <= -4e-265)
		tmp = t_1;
	elseif (y <= 1.8e-186)
		tmp = Float64(b * Float64(t - 2.0));
	elseif (y <= 500000000.0)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x - (t * a);
	t_2 = y * (b - z);
	t_3 = x + (z + a);
	tmp = 0.0;
	if (y <= -7.5e+72)
		tmp = t_2;
	elseif (y <= -2e+52)
		tmp = t_1;
	elseif (y <= -125000000.0)
		tmp = t * (b - a);
	elseif (y <= -1.45e-90)
		tmp = t_3;
	elseif (y <= -4e-265)
		tmp = t_1;
	elseif (y <= 1.8e-186)
		tmp = b * (t - 2.0);
	elseif (y <= 500000000.0)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.5e+72], t$95$2, If[LessEqual[y, -2e+52], t$95$1, If[LessEqual[y, -125000000.0], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.45e-90], t$95$3, If[LessEqual[y, -4e-265], t$95$1, If[LessEqual[y, 1.8e-186], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 500000000.0], t$95$3, t$95$2]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -2 \cdot 10^{+52}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq -1.45 \cdot 10^{-90}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq -4 \cdot 10^{-265}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 500000000:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -7.50000000000000027e72 or 5e8 < y

    1. Initial program 94.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 71.2%

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

    if -7.50000000000000027e72 < y < -2e52 or -1.44999999999999992e-90 < y < -3.99999999999999994e-265

    1. Initial program 97.1%

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

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

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

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

        \[\leadsto x - \color{blue}{t \cdot a} \]
    7. Simplified61.1%

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

    if -2e52 < y < -1.25e8

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

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

    if -1.25e8 < y < -1.44999999999999992e-90 or 1.7999999999999999e-186 < y < 5e8

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + x\right) - -1 \cdot z} \]
    10. Step-by-step derivation
      1. cancel-sign-sub-inv69.0%

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

        \[\leadsto \left(a + x\right) + \color{blue}{1} \cdot z \]
      3. *-lft-identity69.0%

        \[\leadsto \left(a + x\right) + \color{blue}{z} \]
      4. +-commutative69.0%

        \[\leadsto \color{blue}{\left(x + a\right)} + z \]
      5. associate-+l+69.0%

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    11. Simplified69.0%

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

    if -3.99999999999999994e-265 < y < 1.7999999999999999e-186

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+72}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -2 \cdot 10^{+52}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;y \leq -125000000:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -1.45 \cdot 10^{-90}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-265}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-186}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 500000000:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 69.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + z\right) - a \cdot \left(t + -1\right)\\ t_2 := x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;b \leq -1.9 \cdot 10^{+35}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -2.5 \cdot 10^{-6}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -2.3 \cdot 10^{-45}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;b \leq -2.9 \cdot 10^{-112}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -3.1 \cdot 10^{-165}:\\ \;\;\;\;a + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 2 \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) (* a (+ t -1.0)))) (t_2 (+ x (* b (- (+ y t) 2.0)))))
   (if (<= b -1.9e+35)
     t_2
     (if (<= b -2.5e-6)
       t_1
       (if (<= b -2.3e-45)
         (* y (- b z))
         (if (<= b -2.9e-112)
           t_1
           (if (<= b -3.1e-165)
             (+ a (* z (- 1.0 y)))
             (if (<= b 2e+47) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + z) - (a * (t + -1.0));
	double t_2 = x + (b * ((y + t) - 2.0));
	double tmp;
	if (b <= -1.9e+35) {
		tmp = t_2;
	} else if (b <= -2.5e-6) {
		tmp = t_1;
	} else if (b <= -2.3e-45) {
		tmp = y * (b - z);
	} else if (b <= -2.9e-112) {
		tmp = t_1;
	} else if (b <= -3.1e-165) {
		tmp = a + (z * (1.0 - y));
	} else if (b <= 2e+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) - (a * (t + (-1.0d0)))
    t_2 = x + (b * ((y + t) - 2.0d0))
    if (b <= (-1.9d+35)) then
        tmp = t_2
    else if (b <= (-2.5d-6)) then
        tmp = t_1
    else if (b <= (-2.3d-45)) then
        tmp = y * (b - z)
    else if (b <= (-2.9d-112)) then
        tmp = t_1
    else if (b <= (-3.1d-165)) then
        tmp = a + (z * (1.0d0 - y))
    else if (b <= 2d+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) - (a * (t + -1.0));
	double t_2 = x + (b * ((y + t) - 2.0));
	double tmp;
	if (b <= -1.9e+35) {
		tmp = t_2;
	} else if (b <= -2.5e-6) {
		tmp = t_1;
	} else if (b <= -2.3e-45) {
		tmp = y * (b - z);
	} else if (b <= -2.9e-112) {
		tmp = t_1;
	} else if (b <= -3.1e-165) {
		tmp = a + (z * (1.0 - y));
	} else if (b <= 2e+47) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + z) - (a * (t + -1.0))
	t_2 = x + (b * ((y + t) - 2.0))
	tmp = 0
	if b <= -1.9e+35:
		tmp = t_2
	elif b <= -2.5e-6:
		tmp = t_1
	elif b <= -2.3e-45:
		tmp = y * (b - z)
	elif b <= -2.9e-112:
		tmp = t_1
	elif b <= -3.1e-165:
		tmp = a + (z * (1.0 - y))
	elif b <= 2e+47:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + z) - Float64(a * Float64(t + -1.0)))
	t_2 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0)))
	tmp = 0.0
	if (b <= -1.9e+35)
		tmp = t_2;
	elseif (b <= -2.5e-6)
		tmp = t_1;
	elseif (b <= -2.3e-45)
		tmp = Float64(y * Float64(b - z));
	elseif (b <= -2.9e-112)
		tmp = t_1;
	elseif (b <= -3.1e-165)
		tmp = Float64(a + Float64(z * Float64(1.0 - y)));
	elseif (b <= 2e+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) - (a * (t + -1.0));
	t_2 = x + (b * ((y + t) - 2.0));
	tmp = 0.0;
	if (b <= -1.9e+35)
		tmp = t_2;
	elseif (b <= -2.5e-6)
		tmp = t_1;
	elseif (b <= -2.3e-45)
		tmp = y * (b - z);
	elseif (b <= -2.9e-112)
		tmp = t_1;
	elseif (b <= -3.1e-165)
		tmp = a + (z * (1.0 - y));
	elseif (b <= 2e+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[(N[(x + z), $MachinePrecision] - N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.9e+35], t$95$2, If[LessEqual[b, -2.5e-6], t$95$1, If[LessEqual[b, -2.3e-45], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.9e-112], t$95$1, If[LessEqual[b, -3.1e-165], N[(a + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2e+47], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;b \leq -2.9 \cdot 10^{-112}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq -3.1 \cdot 10^{-165}:\\
\;\;\;\;a + z \cdot \left(1 - y\right)\\

\mathbf{elif}\;b \leq 2 \cdot 10^{+47}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.9e35 or 2.0000000000000001e47 < b

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

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

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

    if -1.9e35 < b < -2.5000000000000002e-6 or -2.29999999999999992e-45 < b < -2.89999999999999992e-112 or -3.09999999999999996e-165 < b < 2.0000000000000001e47

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.5000000000000002e-6 < b < -2.29999999999999992e-45

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

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

    if -2.89999999999999992e-112 < b < -3.09999999999999996e-165

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.9 \cdot 10^{+35}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -2.5 \cdot 10^{-6}:\\ \;\;\;\;\left(x + z\right) - a \cdot \left(t + -1\right)\\ \mathbf{elif}\;b \leq -2.3 \cdot 10^{-45}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;b \leq -2.9 \cdot 10^{-112}:\\ \;\;\;\;\left(x + z\right) - a \cdot \left(t + -1\right)\\ \mathbf{elif}\;b \leq -3.1 \cdot 10^{-165}:\\ \;\;\;\;a + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 2 \cdot 10^{+47}:\\ \;\;\;\;\left(x + z\right) - a \cdot \left(t + -1\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 70.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;b \leq -3.8 \cdot 10^{-8}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;b \leq -3.8 \cdot 10^{-167}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 5.3 \cdot 10^{-179}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.9e35 or 2.25e17 < b

    1. Initial program 93.3%

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

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

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

    if -1.9e35 < b < -3.80000000000000028e-8 or -3.79999999999999967e-167 < b < 5.29999999999999994e-179

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.80000000000000028e-8 < b < -9.79999999999999926e-53

    1. Initial program 100.0%

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

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

    if -9.79999999999999926e-53 < b < -3.79999999999999967e-167 or 5.29999999999999994e-179 < b < 2.25e17

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.9 \cdot 10^{+35}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -3.8 \cdot 10^{-8}:\\ \;\;\;\;\left(x + z\right) - a \cdot \left(t + -1\right)\\ \mathbf{elif}\;b \leq -9.8 \cdot 10^{-53}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;b \leq -3.8 \cdot 10^{-167}:\\ \;\;\;\;\left(x + a\right) - \left(y + -1\right) \cdot z\\ \mathbf{elif}\;b \leq 5.3 \cdot 10^{-179}:\\ \;\;\;\;\left(x + z\right) - a \cdot \left(t + -1\right)\\ \mathbf{elif}\;b \leq 2.25 \cdot 10^{+17}:\\ \;\;\;\;\left(x + a\right) - \left(y + -1\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 52.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -6.8 \cdot 10^{-93}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq -8.5 \cdot 10^{-266}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 7000000000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.6000000000000005e71 or 7e9 < y

    1. Initial program 94.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 71.2%

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

    if -4.6000000000000005e71 < y < -6.80000000000000002e-93 or -7.5999999999999996e-243 < y < -8.5000000000000002e-266 or 1.8500000000000001e-186 < y < 7e9

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + x\right) - -1 \cdot z} \]
    10. Step-by-step derivation
      1. cancel-sign-sub-inv64.4%

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

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

        \[\leadsto \left(a + x\right) + \color{blue}{z} \]
      4. +-commutative64.4%

        \[\leadsto \color{blue}{\left(x + a\right)} + z \]
      5. associate-+l+64.4%

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    11. Simplified64.4%

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

    if -6.80000000000000002e-93 < y < -7.5999999999999996e-243

    1. Initial program 96.2%

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

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

    if -8.5000000000000002e-266 < y < 1.8500000000000001e-186

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.6 \cdot 10^{+71}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -6.8 \cdot 10^{-93}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;y \leq -7.6 \cdot 10^{-243}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -8.5 \cdot 10^{-266}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{-186}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 7000000000:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 49.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -2.7 \cdot 10^{+49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-165}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-180}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-130}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{+15}:\\ \;\;\;\;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 -2.7e+49)
     t_1
     (if (<= y -3.2e-165)
       (* t (- b a))
       (if (<= y 6e-180)
         (* b (- t 2.0))
         (if (<= y 2.6e-130) z (if (<= y 6.8e+15) (* 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 <= -2.7e+49) {
		tmp = t_1;
	} else if (y <= -3.2e-165) {
		tmp = t * (b - a);
	} else if (y <= 6e-180) {
		tmp = b * (t - 2.0);
	} else if (y <= 2.6e-130) {
		tmp = z;
	} else if (y <= 6.8e+15) {
		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 <= (-2.7d+49)) then
        tmp = t_1
    else if (y <= (-3.2d-165)) then
        tmp = t * (b - a)
    else if (y <= 6d-180) then
        tmp = b * (t - 2.0d0)
    else if (y <= 2.6d-130) then
        tmp = z
    else if (y <= 6.8d+15) 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 <= -2.7e+49) {
		tmp = t_1;
	} else if (y <= -3.2e-165) {
		tmp = t * (b - a);
	} else if (y <= 6e-180) {
		tmp = b * (t - 2.0);
	} else if (y <= 2.6e-130) {
		tmp = z;
	} else if (y <= 6.8e+15) {
		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 <= -2.7e+49:
		tmp = t_1
	elif y <= -3.2e-165:
		tmp = t * (b - a)
	elif y <= 6e-180:
		tmp = b * (t - 2.0)
	elif y <= 2.6e-130:
		tmp = z
	elif y <= 6.8e+15:
		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 <= -2.7e+49)
		tmp = t_1;
	elseif (y <= -3.2e-165)
		tmp = Float64(t * Float64(b - a));
	elseif (y <= 6e-180)
		tmp = Float64(b * Float64(t - 2.0));
	elseif (y <= 2.6e-130)
		tmp = z;
	elseif (y <= 6.8e+15)
		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 <= -2.7e+49)
		tmp = t_1;
	elseif (y <= -3.2e-165)
		tmp = t * (b - a);
	elseif (y <= 6e-180)
		tmp = b * (t - 2.0);
	elseif (y <= 2.6e-130)
		tmp = z;
	elseif (y <= 6.8e+15)
		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, -2.7e+49], t$95$1, If[LessEqual[y, -3.2e-165], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e-180], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e-130], z, If[LessEqual[y, 6.8e+15], 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.7 \cdot 10^{+49}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;y \leq 2.6 \cdot 10^{-130}:\\
\;\;\;\;z\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -2.7000000000000001e49 or 6.8e15 < y

    1. Initial program 94.7%

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

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

    if -2.7000000000000001e49 < y < -3.20000000000000013e-165

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

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

    if -3.20000000000000013e-165 < y < 6.0000000000000001e-180

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

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

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

    if 6.0000000000000001e-180 < y < 2.6000000000000001e-130

    1. Initial program 100.0%

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

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

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

    if 2.6000000000000001e-130 < y < 6.8e15

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{+49}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-165}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-180}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-130}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{+15}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 33.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -1.32 \cdot 10^{-264}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;y \leq 5.8 \cdot 10^{-185}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;y \leq 3.6 \cdot 10^{+15}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;y \leq 2.45 \cdot 10^{+117}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.4e72 or 3.6e15 < y < 2.45e117

    1. Initial program 92.7%

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

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

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

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

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

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

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

    if -1.4e72 < y < -1.32000000000000001e-264 or 5.79999999999999989e-185 < y < 3.6e15

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{a} \]
      4. +-commutative37.6%

        \[\leadsto \color{blue}{a + x} \]
    7. Simplified37.6%

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

    if -1.32000000000000001e-264 < y < 5.79999999999999989e-185

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.45e117 < y

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{+72}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq -1.32 \cdot 10^{-264}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-185}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{+15}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 2.45 \cdot 10^{+117}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 67.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -3.5 \cdot 10^{-189}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 1.08 \cdot 10^{+17}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.9499999999999997e73 or 1.08e17 < y

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

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

    if -3.9499999999999997e73 < y < -3.5000000000000001e-189 or 1.1e-122 < y < 1.08e17

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.5000000000000001e-189 < y < 1.1e-122

    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 + b \cdot \left(t - 2\right)\right) - \left(-1 \cdot z + a \cdot \left(t - 1\right)\right)} \]
    4. Taylor expanded in a around 0 85.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.95 \cdot 10^{+73}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -3.5 \cdot 10^{-189}:\\ \;\;\;\;\left(x + z\right) - a \cdot \left(t + -1\right)\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{-122}:\\ \;\;\;\;z + \left(x + b \cdot \left(t - 2\right)\right)\\ \mathbf{elif}\;y \leq 1.08 \cdot 10^{+17}:\\ \;\;\;\;\left(x + z\right) - a \cdot \left(t + -1\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 84.1% accurate, 0.7× speedup?

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

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

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

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

\mathbf{elif}\;b \leq 9.2 \cdot 10^{+95}:\\
\;\;\;\;x + \left(a + -2 \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.9e35 or 9.19999999999999989e95 < b

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

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

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

    if -1.9e35 < b < 0.034000000000000002

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

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

    if 0.034000000000000002 < b < 1.75e89

    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. Step-by-step derivation
      1. associate-+l-99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.75e89 < b < 9.19999999999999989e95

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\left(a + -2 \cdot b\right)} \]
    8. Step-by-step derivation
      1. *-commutative100.0%

        \[\leadsto x + \left(a + \color{blue}{b \cdot -2}\right) \]
    9. Simplified100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.9 \cdot 10^{+35}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 0.034:\\ \;\;\;\;x + \left(z \cdot \left(1 - y\right) + a \cdot \left(1 - t\right)\right)\\ \mathbf{elif}\;b \leq 1.75 \cdot 10^{+89}:\\ \;\;\;\;\left(x - \left(y + -1\right) \cdot z\right) + t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq 9.2 \cdot 10^{+95}:\\ \;\;\;\;x + \left(a + -2 \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 93.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \left(y + -1\right) \cdot z\\
\mathbf{if}\;t \leq -7.5 \cdot 10^{+42} \lor \neg \left(t \leq 1.2 \cdot 10^{+78}\right):\\
\;\;\;\;\left(x - t_1\right) + t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.50000000000000041e42 or 1.1999999999999999e78 < t

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.50000000000000041e42 < t < 1.1999999999999999e78

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x + a\right) + \left(-\color{blue}{\left(-1 \cdot z + y \cdot z\right)}\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      10. distribute-neg-in96.0%

        \[\leadsto \left(\left(x + a\right) + \color{blue}{\left(\left(--1 \cdot z\right) + \left(-y \cdot z\right)\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      11. distribute-lft-neg-in96.0%

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

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

        \[\leadsto \left(\left(x + a\right) + \left(1 \cdot z + \color{blue}{-1 \cdot \left(y \cdot z\right)}\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      14. associate-*r*96.0%

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

        \[\leadsto \left(\left(x + a\right) + \left(1 \cdot z + \color{blue}{\left(y \cdot -1\right)} \cdot z\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      16. distribute-rgt-in96.0%

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

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

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

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

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

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

Alternative 15: 55.6% accurate, 0.8× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.2499999999999999e72 or 1.08e8 < y

    1. Initial program 94.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 71.2%

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

    if -2.2499999999999999e72 < y < -3.4000000000000001e-265

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

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

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

    if -3.4000000000000001e-265 < y < 2.5500000000000002e-186

    1. Initial program 100.0%

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

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

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

    if 2.5500000000000002e-186 < y < 1.08e8

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + x\right) - -1 \cdot z} \]
    10. Step-by-step derivation
      1. cancel-sign-sub-inv71.3%

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

        \[\leadsto \left(a + x\right) + \color{blue}{1} \cdot z \]
      3. *-lft-identity71.3%

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

        \[\leadsto \color{blue}{\left(x + a\right)} + z \]
      5. associate-+l+71.3%

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    11. Simplified71.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.25 \cdot 10^{+72}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -3.4 \cdot 10^{-265}:\\ \;\;\;\;x - a \cdot \left(t + -1\right)\\ \mathbf{elif}\;y \leq 2.55 \cdot 10^{-186}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 108000000:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 57.8% accurate, 0.8× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.9999999999999998e71 or 1.5e9 < y

    1. Initial program 94.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 71.2%

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

    if -6.9999999999999998e71 < y < -1.36e-163

    1. Initial program 98.0%

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

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

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

    if -1.36e-163 < y < 2.79999999999999983e-186

    1. Initial program 100.0%

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

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

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

    if 2.79999999999999983e-186 < y < 1.5e9

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + x\right) - -1 \cdot z} \]
    10. Step-by-step derivation
      1. cancel-sign-sub-inv71.3%

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

        \[\leadsto \left(a + x\right) + \color{blue}{1} \cdot z \]
      3. *-lft-identity71.3%

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

        \[\leadsto \color{blue}{\left(x + a\right)} + z \]
      5. associate-+l+71.3%

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    11. Simplified71.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+71}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.36 \cdot 10^{-163}:\\ \;\;\;\;x - a \cdot \left(t + -1\right)\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{-186}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;y \leq 1500000000:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 86.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -33000000000000 \lor \neg \left(z \leq 1200000000\right):\\
\;\;\;\;\left(x - \left(y + -1\right) \cdot z\right) + t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.3e13 or 1.2e9 < z

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.3e13 < z < 1.2e9

    1. Initial program 98.6%

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

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

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

Alternative 18: 87.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;b \leq 225000000000:\\
\;\;\;\;x + \left(t_1 + t_3\right)\\

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


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

    1. Initial program 92.5%

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

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

    if -2.50000000000000023e24 < b < 2.25e11

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

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

    if 2.25e11 < b

    1. Initial program 94.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 z around 0 94.4%

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

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

Alternative 19: 25.4% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq -4 \cdot 10^{-146}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 7.2 \cdot 10^{-186}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;y \leq 45:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.05e157 or 45 < y

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

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

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

    if -1.05e157 < y < -4.0000000000000001e-146

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

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

    if -4.0000000000000001e-146 < y < 7.1999999999999997e-186

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.1999999999999997e-186 < y < 45

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.05 \cdot 10^{+157}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-146}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{-186}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 45:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 31.7% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq -8.6 \cdot 10^{-265}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;y \leq 1.1 \cdot 10^{-186}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;y \leq 4.4 \cdot 10^{+119}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.50000000000000046e158 or 4.4000000000000003e119 < y

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

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

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

    if -4.50000000000000046e158 < y < -8.6000000000000003e-265 or 1.10000000000000007e-186 < y < 4.4000000000000003e119

    1. Initial program 98.6%

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

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

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

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

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

        \[\leadsto x + \color{blue}{1} \cdot a \]
      3. *-lft-identity34.1%

        \[\leadsto x + \color{blue}{a} \]
      4. +-commutative34.1%

        \[\leadsto \color{blue}{a + x} \]
    7. Simplified34.1%

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

    if -8.6000000000000003e-265 < y < 1.10000000000000007e-186

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{+158}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -8.6 \cdot 10^{-265}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{-186}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{+119}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 83.9% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.9e35 or 2.8499999999999999e49 < b

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

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

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

    if -1.9e35 < b < 2.8499999999999999e49

    1. Initial program 100.0%

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

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

Alternative 22: 48.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -200000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-182}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 118:\\ \;\;\;\;b \cdot \left(y - 2\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 -200000000.0)
     t_1
     (if (<= t -4.5e-182) (+ x a) (if (<= t 118.0) (* b (- y 2.0)) 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 <= -200000000.0) {
		tmp = t_1;
	} else if (t <= -4.5e-182) {
		tmp = x + a;
	} else if (t <= 118.0) {
		tmp = b * (y - 2.0);
	} 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 <= (-200000000.0d0)) then
        tmp = t_1
    else if (t <= (-4.5d-182)) then
        tmp = x + a
    else if (t <= 118.0d0) then
        tmp = b * (y - 2.0d0)
    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 <= -200000000.0) {
		tmp = t_1;
	} else if (t <= -4.5e-182) {
		tmp = x + a;
	} else if (t <= 118.0) {
		tmp = b * (y - 2.0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t * (b - a)
	tmp = 0
	if t <= -200000000.0:
		tmp = t_1
	elif t <= -4.5e-182:
		tmp = x + a
	elif t <= 118.0:
		tmp = b * (y - 2.0)
	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 <= -200000000.0)
		tmp = t_1;
	elseif (t <= -4.5e-182)
		tmp = Float64(x + a);
	elseif (t <= 118.0)
		tmp = Float64(b * Float64(y - 2.0));
	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 <= -200000000.0)
		tmp = t_1;
	elseif (t <= -4.5e-182)
		tmp = x + a;
	elseif (t <= 118.0)
		tmp = b * (y - 2.0);
	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, -200000000.0], t$95$1, If[LessEqual[t, -4.5e-182], N[(x + a), $MachinePrecision], If[LessEqual[t, 118.0], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -200000000:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2e8 or 118 < t

    1. Initial program 95.5%

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

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

    if -2e8 < t < -4.4999999999999999e-182

    1. Initial program 100.0%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{a} \]
      4. +-commutative63.2%

        \[\leadsto \color{blue}{a + x} \]
    7. Simplified63.2%

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

    if -4.4999999999999999e-182 < t < 118

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -200000000:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-182}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 118:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 25.0% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;b \leq 9 \cdot 10^{-104}:\\
\;\;\;\;x\\

\mathbf{elif}\;b \leq 3.3 \cdot 10^{+47}:\\
\;\;\;\;z\\

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


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

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.5999999999999999e35 < b < 8.9999999999999995e-104

    1. Initial program 100.0%

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

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

    if 8.9999999999999995e-104 < b < 3.2999999999999999e47

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7.6 \cdot 10^{+35}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq 9 \cdot 10^{-104}:\\ \;\;\;\;x\\ \mathbf{elif}\;b \leq 3.3 \cdot 10^{+47}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 13.6% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;y \leq 2.4 \cdot 10^{-182}:\\
\;\;\;\;-2 \cdot b\\

\mathbf{elif}\;y \leq 0.00032:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.00000000000000031e-265

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

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

    if -7.00000000000000031e-265 < y < 2.3999999999999998e-182

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

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

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

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

        \[\leadsto \color{blue}{b \cdot -2} \]
    7. Simplified29.2%

      \[\leadsto \color{blue}{b \cdot -2} \]

    if 2.3999999999999998e-182 < y < 3.20000000000000026e-4

    1. Initial program 100.0%

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

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

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

    if 3.20000000000000026e-4 < y

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{-265}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{-182}:\\ \;\;\;\;-2 \cdot b\\ \mathbf{elif}\;y \leq 0.00032:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 20.7% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;x \leq 1.55 \cdot 10^{+84}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.5000000000000006e-45 or 1.55000000000000001e84 < x

    1. Initial program 97.3%

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

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

    if -7.5000000000000006e-45 < x < 1.55000000000000001e84

    1. Initial program 97.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.5 \cdot 10^{-45}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.55 \cdot 10^{+84}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 14.4% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.8 \cdot 10^{-265}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 0.0026:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.80000000000000042e-265

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

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

    if -8.80000000000000042e-265 < y < 0.0025999999999999999

    1. Initial program 100.0%

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

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

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

    if 0.0025999999999999999 < y

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.8 \cdot 10^{-265}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 0.0026:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 27: 11.5% accurate, 21.0× speedup?

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

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

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

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

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

    \[\leadsto a \]
  6. Add Preprocessing

Reproduce

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