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

Percentage Accurate: 95.6% → 98.2%
Time: 13.0s
Alternatives: 21
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 21 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.6% accurate, 1.0× speedup?

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

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

Alternative 1: 98.2% 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(t + -1\right)\right) + b \cdot \left(\left(t + y\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 (+ t -1.0)))
          (* b (- (+ t y) 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 * (t + -1.0))) + (b * ((t + y) - 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 * (t + -1.0))) + (b * ((t + y) - 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 * (t + -1.0))) + (b * ((t + y) - 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(t + -1.0))) + Float64(b * Float64(Float64(t + y) - 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 * (t + -1.0))) + (b * ((t + y) - 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[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(N[(t + y), $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(t + -1\right)\right) + b \cdot \left(\left(t + y\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 \]

    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. Step-by-step derivation
      1. associate-+l-0.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. *-commutative0.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) \]
      3. *-commutative0.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg0.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) \]
      5. metadata-eval0.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) \]
      6. remove-double-neg0.0%

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

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

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

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

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

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

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

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

Alternative 2: 97.7% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(t - \left(2 - y\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 (- t (- 2.0 y)) 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((t - (2.0 - y)), b, (x - fma((y + -1.0), z, (a * (t + -1.0)))));
}
function code(x, y, z, t, a, b)
	return fma(Float64(t - Float64(2.0 - y)), 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[(t - N[(2.0 - y), $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(t - \left(2 - y\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)
\end{array}
Derivation
  1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 50.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -7.2 \cdot 10^{+14}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -4.7 \cdot 10^{-113}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.3 \cdot 10^{-157}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-276}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 6.3 \cdot 10^{-167}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-86}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{-63}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+32}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- b z))) (t_2 (* t (- b a))))
   (if (<= t -7.2e+14)
     t_2
     (if (<= t -4.7e-113)
       t_1
       (if (<= t -4.3e-157)
         (+ x a)
         (if (<= t -3.5e-276)
           (* z (- 1.0 y))
           (if (<= t 6.3e-167)
             (+ x a)
             (if (<= t 2.7e-86)
               t_1
               (if (<= t 8.8e-63) (+ x a) (if (<= t 2.1e+32) t_1 t_2))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -7.2e+14) {
		tmp = t_2;
	} else if (t <= -4.7e-113) {
		tmp = t_1;
	} else if (t <= -4.3e-157) {
		tmp = x + a;
	} else if (t <= -3.5e-276) {
		tmp = z * (1.0 - y);
	} else if (t <= 6.3e-167) {
		tmp = x + a;
	} else if (t <= 2.7e-86) {
		tmp = t_1;
	} else if (t <= 8.8e-63) {
		tmp = x + a;
	} else if (t <= 2.1e+32) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * (b - z)
    t_2 = t * (b - a)
    if (t <= (-7.2d+14)) then
        tmp = t_2
    else if (t <= (-4.7d-113)) then
        tmp = t_1
    else if (t <= (-4.3d-157)) then
        tmp = x + a
    else if (t <= (-3.5d-276)) then
        tmp = z * (1.0d0 - y)
    else if (t <= 6.3d-167) then
        tmp = x + a
    else if (t <= 2.7d-86) then
        tmp = t_1
    else if (t <= 8.8d-63) then
        tmp = x + a
    else if (t <= 2.1d+32) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -7.2e+14) {
		tmp = t_2;
	} else if (t <= -4.7e-113) {
		tmp = t_1;
	} else if (t <= -4.3e-157) {
		tmp = x + a;
	} else if (t <= -3.5e-276) {
		tmp = z * (1.0 - y);
	} else if (t <= 6.3e-167) {
		tmp = x + a;
	} else if (t <= 2.7e-86) {
		tmp = t_1;
	} else if (t <= 8.8e-63) {
		tmp = x + a;
	} else if (t <= 2.1e+32) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	t_2 = t * (b - a)
	tmp = 0
	if t <= -7.2e+14:
		tmp = t_2
	elif t <= -4.7e-113:
		tmp = t_1
	elif t <= -4.3e-157:
		tmp = x + a
	elif t <= -3.5e-276:
		tmp = z * (1.0 - y)
	elif t <= 6.3e-167:
		tmp = x + a
	elif t <= 2.7e-86:
		tmp = t_1
	elif t <= 8.8e-63:
		tmp = x + a
	elif t <= 2.1e+32:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b - z))
	t_2 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -7.2e+14)
		tmp = t_2;
	elseif (t <= -4.7e-113)
		tmp = t_1;
	elseif (t <= -4.3e-157)
		tmp = Float64(x + a);
	elseif (t <= -3.5e-276)
		tmp = Float64(z * Float64(1.0 - y));
	elseif (t <= 6.3e-167)
		tmp = Float64(x + a);
	elseif (t <= 2.7e-86)
		tmp = t_1;
	elseif (t <= 8.8e-63)
		tmp = Float64(x + a);
	elseif (t <= 2.1e+32)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * (b - z);
	t_2 = t * (b - a);
	tmp = 0.0;
	if (t <= -7.2e+14)
		tmp = t_2;
	elseif (t <= -4.7e-113)
		tmp = t_1;
	elseif (t <= -4.3e-157)
		tmp = x + a;
	elseif (t <= -3.5e-276)
		tmp = z * (1.0 - y);
	elseif (t <= 6.3e-167)
		tmp = x + a;
	elseif (t <= 2.7e-86)
		tmp = t_1;
	elseif (t <= 8.8e-63)
		tmp = x + a;
	elseif (t <= 2.1e+32)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.2e+14], t$95$2, If[LessEqual[t, -4.7e-113], t$95$1, If[LessEqual[t, -4.3e-157], N[(x + a), $MachinePrecision], If[LessEqual[t, -3.5e-276], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.3e-167], N[(x + a), $MachinePrecision], If[LessEqual[t, 2.7e-86], t$95$1, If[LessEqual[t, 8.8e-63], N[(x + a), $MachinePrecision], If[LessEqual[t, 2.1e+32], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -4.7 \cdot 10^{-113}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;t \leq 2.7 \cdot 10^{-86}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 2.1 \cdot 10^{+32}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.2e14 or 2.1000000000000001e32 < t

    1. Initial program 92.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. Step-by-step derivation
      1. associate-+l-92.6%

        \[\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. *-commutative92.6%

        \[\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) \]
      3. *-commutative92.6%

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

        \[\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) \]
      5. metadata-eval92.6%

        \[\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) \]
      6. remove-double-neg92.6%

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

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

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

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

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

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

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

    if -7.2e14 < t < -4.7000000000000002e-113 or 6.3000000000000001e-167 < t < 2.69999999999999992e-86 or 8.7999999999999998e-63 < t < 2.1000000000000001e32

    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. 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. *-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) \]
      3. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. 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) \]
      5. 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) \]
      6. remove-double-neg100.0%

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

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

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

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

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

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

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

    if -4.7000000000000002e-113 < t < -4.2999999999999998e-157 or -3.49999999999999993e-276 < t < 6.3000000000000001e-167 or 2.69999999999999992e-86 < t < 8.7999999999999998e-63

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

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

        \[\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) \]
      3. *-commutative94.7%

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

        \[\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) \]
      5. metadata-eval94.7%

        \[\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) \]
      6. remove-double-neg94.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+94.7%

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

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

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

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

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

    if -4.2999999999999998e-157 < t < -3.49999999999999993e-276

    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. 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. *-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) \]
      3. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. 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) \]
      5. 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) \]
      6. remove-double-neg100.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{+14}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -4.7 \cdot 10^{-113}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq -4.3 \cdot 10^{-157}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-276}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 6.3 \cdot 10^{-167}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-86}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{-63}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+32}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 4: 59.3% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;t \leq 7.2 \cdot 10^{-158}:\\
\;\;\;\;x + \left(z + a\right)\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -340 or 7.99999999999999952e39 < t

    1. Initial program 92.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-92.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. *-commutative92.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) \]
      3. *-commutative92.8%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg92.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) \]
      5. metadata-eval92.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) \]
      6. remove-double-neg92.8%

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

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

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

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

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

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

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

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

    if -340 < t < -9.7000000000000005e-265

    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. Step-by-step derivation
      1. associate-+l-98.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. *-commutative98.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) \]
      3. *-commutative98.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg98.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) \]
      5. metadata-eval98.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) \]
      6. remove-double-neg98.0%

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

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

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

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

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

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

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

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

    if -9.7000000000000005e-265 < t < 7.19999999999999982e-158

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

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

        \[\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) \]
      3. *-commutative95.5%

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

        \[\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) \]
      5. metadata-eval95.5%

        \[\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) \]
      6. remove-double-neg95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+95.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    13. Simplified65.1%

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

    if 7.19999999999999982e-158 < t < 2.6000000000000001e-86

    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. 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. *-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) \]
      3. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. 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) \]
      5. 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) \]
      6. remove-double-neg100.0%

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

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

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

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

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

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

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

    if 2.6000000000000001e-86 < t < 5.99999999999999959e-63

    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. 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. *-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) \]
      3. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. 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) \]
      5. 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) \]
      6. remove-double-neg100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+100.0%

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

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

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

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

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

    if 5.99999999999999959e-63 < t < 7.99999999999999952e39

    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. associate-+l-99.9%

        \[\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. *-commutative99.9%

        \[\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) \]
      3. *-commutative99.9%

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

        \[\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) \]
      5. metadata-eval99.9%

        \[\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) \]
      6. remove-double-neg99.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -340:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -9.7 \cdot 10^{-265}:\\ \;\;\;\;x - \left(y + -1\right) \cdot z\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-158}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-86}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-63}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+39}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 5: 72.1% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;t \leq 5.8 \cdot 10^{-252}:\\
\;\;\;\;\left(x + a\right) - t_1\\

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

\mathbf{elif}\;t \leq 5.3 \cdot 10^{+48}:\\
\;\;\;\;\left(x - t_1\right) + y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -205000 or 5.3e48 < t

    1. Initial program 92.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. Step-by-step derivation
      1. associate-+l-92.6%

        \[\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. *-commutative92.6%

        \[\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) \]
      3. *-commutative92.6%

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

        \[\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) \]
      5. metadata-eval92.6%

        \[\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) \]
      6. remove-double-neg92.6%

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

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

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

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

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

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

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

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

    if -205000 < t < 5.8000000000000001e-252

    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. associate-+l-97.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. *-commutative97.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) \]
      3. *-commutative97.2%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg97.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) \]
      5. metadata-eval97.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) \]
      6. remove-double-neg97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+97.2%

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

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

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

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

    if 5.8000000000000001e-252 < t < 3.00000000000000009e-54

    1. Initial program 97.9%

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

        \[\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. *-commutative97.9%

        \[\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) \]
      3. *-commutative97.9%

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

        \[\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) \]
      5. metadata-eval97.9%

        \[\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) \]
      6. remove-double-neg97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+97.9%

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

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

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

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

    if 3.00000000000000009e-54 < t < 5.3e48

    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. associate-+l-99.9%

        \[\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. *-commutative99.9%

        \[\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) \]
      3. *-commutative99.9%

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

        \[\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) \]
      5. metadata-eval99.9%

        \[\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) \]
      6. remove-double-neg99.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -205000:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-252}:\\ \;\;\;\;\left(x + a\right) - \left(y + -1\right) \cdot z\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-54}:\\ \;\;\;\;\left(x + a\right) - b \cdot \left(2 - y\right)\\ \mathbf{elif}\;t \leq 5.3 \cdot 10^{+48}:\\ \;\;\;\;\left(x - \left(y + -1\right) \cdot z\right) + y \cdot b\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 6: 79.1% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;t \leq 8 \cdot 10^{-252}:\\
\;\;\;\;\left(x + a\right) - t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.9999999999999996e-39 or 1.3999999999999999e-46 < t

    1. Initial program 93.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-93.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. *-commutative93.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) \]
      3. *-commutative93.8%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg93.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) \]
      5. metadata-eval93.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) \]
      6. remove-double-neg93.8%

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

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

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

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

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

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

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

    if -9.9999999999999996e-39 < t < 7.99999999999999954e-252

    1. Initial program 96.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-96.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. *-commutative96.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) \]
      3. *-commutative96.8%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg96.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) \]
      5. metadata-eval96.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) \]
      6. remove-double-neg96.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+96.8%

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

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

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

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

    if 7.99999999999999954e-252 < t < 1.3999999999999999e-46

    1. Initial program 97.9%

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

        \[\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. *-commutative97.9%

        \[\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) \]
      3. *-commutative97.9%

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

        \[\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) \]
      5. metadata-eval97.9%

        \[\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) \]
      6. remove-double-neg97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+97.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-38}:\\ \;\;\;\;\left(x - \left(y + -1\right) \cdot z\right) + t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-252}:\\ \;\;\;\;\left(x + a\right) - \left(y + -1\right) \cdot z\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-46}:\\ \;\;\;\;\left(x + a\right) - b \cdot \left(2 - y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x - \left(y + -1\right) \cdot z\right) + t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 7: 86.2% accurate, 1.1× speedup?

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

\mathbf{else}:\\
\;\;\;\;\left(x + b \cdot \left(\left(t + y\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.7e-8 or 0.80000000000000004 < z

    1. Initial program 90.7%

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

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

        \[\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) \]
      3. *-commutative90.7%

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

        \[\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) \]
      5. metadata-eval90.7%

        \[\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) \]
      6. remove-double-neg90.7%

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

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

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

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

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

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

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

    if -3.7e-8 < z < 0.80000000000000004

    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. 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. *-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) \]
      3. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. 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) \]
      5. 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) \]
      6. remove-double-neg100.0%

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

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

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

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

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

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

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

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

Alternative 8: 92.9% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.55e14 or 9.9999999999999994e38 < t

    1. Initial program 92.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. Step-by-step derivation
      1. associate-+l-92.6%

        \[\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. *-commutative92.6%

        \[\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) \]
      3. *-commutative92.6%

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

        \[\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) \]
      5. metadata-eval92.6%

        \[\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) \]
      6. remove-double-neg92.6%

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

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

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

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

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

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

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

    if -1.55e14 < t < 9.9999999999999994e38

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

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

        \[\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) \]
      3. *-commutative97.7%

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

        \[\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) \]
      5. metadata-eval97.7%

        \[\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) \]
      6. remove-double-neg97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+95.4%

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

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

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

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

Alternative 9: 59.7% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq 6.2 \cdot 10^{-160}:\\
\;\;\;\;x + \left(z + a\right)\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2800 or 1.9999999999999999e33 < t

    1. Initial program 92.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-92.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. *-commutative92.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) \]
      3. *-commutative92.8%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg92.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) \]
      5. metadata-eval92.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) \]
      6. remove-double-neg92.8%

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

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

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

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

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

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

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

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

    if -2800 < t < 6.2000000000000001e-160

    1. Initial program 96.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-96.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. *-commutative96.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) \]
      3. *-commutative96.8%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg96.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) \]
      5. metadata-eval96.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) \]
      6. remove-double-neg96.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+96.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    13. Simplified59.9%

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

    if 6.2000000000000001e-160 < t < 1.40000000000000005e-86

    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. 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. *-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) \]
      3. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. 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) \]
      5. 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) \]
      6. remove-double-neg100.0%

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

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

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

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

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

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

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

    if 1.40000000000000005e-86 < t < 3.29999999999999994e-63

    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. 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. *-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) \]
      3. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. 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) \]
      5. 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) \]
      6. remove-double-neg100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+100.0%

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

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

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

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

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

    if 3.29999999999999994e-63 < t < 1.9999999999999999e33

    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. associate-+l-99.9%

        \[\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. *-commutative99.9%

        \[\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) \]
      3. *-commutative99.9%

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

        \[\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) \]
      5. metadata-eval99.9%

        \[\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) \]
      6. remove-double-neg99.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2800:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-160}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-86}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-63}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+33}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 10: 62.4% accurate, 1.2× speedup?

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

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

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

\mathbf{elif}\;t \leq 3.2 \cdot 10^{-153}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq 1.3 \cdot 10^{+31}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -135000 or 1.3e31 < t

    1. Initial program 92.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-92.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. *-commutative92.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) \]
      3. *-commutative92.8%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg92.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) \]
      5. metadata-eval92.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) \]
      6. remove-double-neg92.8%

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

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

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

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

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

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

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

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

    if -135000 < t < -2.84999999999999987e-276

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

        \[\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. *-commutative98.1%

        \[\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) \]
      3. *-commutative98.1%

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

        \[\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) \]
      5. metadata-eval98.1%

        \[\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) \]
      6. remove-double-neg98.1%

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

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

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

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

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

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

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

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

    if -2.84999999999999987e-276 < t < 3.1999999999999999e-153 or 1.7e-85 < t < 1.3e31

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

        \[\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. *-commutative96.9%

        \[\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) \]
      3. *-commutative96.9%

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

        \[\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) \]
      5. metadata-eval96.9%

        \[\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) \]
      6. remove-double-neg96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+94.7%

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

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

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

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

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

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

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

    if 3.1999999999999999e-153 < t < 1.7e-85

    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. 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. *-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) \]
      3. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. 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) \]
      5. 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) \]
      6. remove-double-neg100.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -135000:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -2.85 \cdot 10^{-276}:\\ \;\;\;\;x - \left(y + -1\right) \cdot z\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-153}:\\ \;\;\;\;\left(x + a\right) - y \cdot z\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-85}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{+31}:\\ \;\;\;\;\left(x + a\right) - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 11: 71.5% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + a\right) - \left(y + -1\right) \cdot z\\ t_2 := x + t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -66000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-251}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-49}:\\ \;\;\;\;\left(x + a\right) - b \cdot \left(2 - y\right)\\ \mathbf{elif}\;t \leq 110:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+38}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \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 (* t (- b a)))))
   (if (<= t -66000.0)
     t_2
     (if (<= t 1.8e-251)
       t_1
       (if (<= t 4.2e-49)
         (- (+ x a) (* b (- 2.0 y)))
         (if (<= t 110.0) t_1 (if (<= t 3.5e+38) (* y (- b z)) t_2)))))))
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 + (t * (b - a));
	double tmp;
	if (t <= -66000.0) {
		tmp = t_2;
	} else if (t <= 1.8e-251) {
		tmp = t_1;
	} else if (t <= 4.2e-49) {
		tmp = (x + a) - (b * (2.0 - y));
	} else if (t <= 110.0) {
		tmp = t_1;
	} else if (t <= 3.5e+38) {
		tmp = y * (b - z);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (x + a) - ((y + (-1.0d0)) * z)
    t_2 = x + (t * (b - a))
    if (t <= (-66000.0d0)) then
        tmp = t_2
    else if (t <= 1.8d-251) then
        tmp = t_1
    else if (t <= 4.2d-49) then
        tmp = (x + a) - (b * (2.0d0 - y))
    else if (t <= 110.0d0) then
        tmp = t_1
    else if (t <= 3.5d+38) then
        tmp = y * (b - z)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + a) - ((y + -1.0) * z);
	double t_2 = x + (t * (b - a));
	double tmp;
	if (t <= -66000.0) {
		tmp = t_2;
	} else if (t <= 1.8e-251) {
		tmp = t_1;
	} else if (t <= 4.2e-49) {
		tmp = (x + a) - (b * (2.0 - y));
	} else if (t <= 110.0) {
		tmp = t_1;
	} else if (t <= 3.5e+38) {
		tmp = y * (b - z);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + a) - ((y + -1.0) * z)
	t_2 = x + (t * (b - a))
	tmp = 0
	if t <= -66000.0:
		tmp = t_2
	elif t <= 1.8e-251:
		tmp = t_1
	elif t <= 4.2e-49:
		tmp = (x + a) - (b * (2.0 - y))
	elif t <= 110.0:
		tmp = t_1
	elif t <= 3.5e+38:
		tmp = y * (b - z)
	else:
		tmp = t_2
	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(x + Float64(t * Float64(b - a)))
	tmp = 0.0
	if (t <= -66000.0)
		tmp = t_2;
	elseif (t <= 1.8e-251)
		tmp = t_1;
	elseif (t <= 4.2e-49)
		tmp = Float64(Float64(x + a) - Float64(b * Float64(2.0 - y)));
	elseif (t <= 110.0)
		tmp = t_1;
	elseif (t <= 3.5e+38)
		tmp = Float64(y * Float64(b - z));
	else
		tmp = t_2;
	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 + (t * (b - a));
	tmp = 0.0;
	if (t <= -66000.0)
		tmp = t_2;
	elseif (t <= 1.8e-251)
		tmp = t_1;
	elseif (t <= 4.2e-49)
		tmp = (x + a) - (b * (2.0 - y));
	elseif (t <= 110.0)
		tmp = t_1;
	elseif (t <= 3.5e+38)
		tmp = y * (b - z);
	else
		tmp = t_2;
	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[(x + N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -66000.0], t$95$2, If[LessEqual[t, 1.8e-251], t$95$1, If[LessEqual[t, 4.2e-49], N[(N[(x + a), $MachinePrecision] - N[(b * N[(2.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 110.0], t$95$1, If[LessEqual[t, 3.5e+38], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 1.8 \cdot 10^{-251}:\\
\;\;\;\;t_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -66000 or 3.50000000000000002e38 < t

    1. Initial program 92.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-92.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. *-commutative92.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) \]
      3. *-commutative92.8%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg92.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) \]
      5. metadata-eval92.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) \]
      6. remove-double-neg92.8%

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

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

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

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

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

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

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

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

    if -66000 < t < 1.8000000000000001e-251 or 4.1999999999999998e-49 < t < 110

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

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

        \[\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) \]
      3. *-commutative97.5%

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

        \[\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) \]
      5. metadata-eval97.5%

        \[\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) \]
      6. remove-double-neg97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+96.9%

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

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

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

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

    if 1.8000000000000001e-251 < t < 4.1999999999999998e-49

    1. Initial program 97.9%

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

        \[\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. *-commutative97.9%

        \[\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) \]
      3. *-commutative97.9%

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

        \[\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) \]
      5. metadata-eval97.9%

        \[\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) \]
      6. remove-double-neg97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+97.9%

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

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

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

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

    if 110 < t < 3.50000000000000002e38

    1. Initial program 99.6%

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

        \[\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. *-commutative99.6%

        \[\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) \]
      3. *-commutative99.6%

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

        \[\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) \]
      5. metadata-eval99.6%

        \[\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) \]
      6. remove-double-neg99.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -66000:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-251}:\\ \;\;\;\;\left(x + a\right) - \left(y + -1\right) \cdot z\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-49}:\\ \;\;\;\;\left(x + a\right) - b \cdot \left(2 - y\right)\\ \mathbf{elif}\;t \leq 110:\\ \;\;\;\;\left(x + a\right) - \left(y + -1\right) \cdot z\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+38}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 12: 70.6% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + a\right) - \left(y + -1\right) \cdot z\\ t_2 := x + t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -13600:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-111}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-87}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;t \leq 1.46 \cdot 10^{+31}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \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 (* t (- b a)))))
   (if (<= t -13600.0)
     t_2
     (if (<= t 4.6e-111)
       t_1
       (if (<= t 2.4e-87)
         (* b (- (+ t y) 2.0))
         (if (<= t 1.46e+31) t_1 t_2))))))
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 + (t * (b - a));
	double tmp;
	if (t <= -13600.0) {
		tmp = t_2;
	} else if (t <= 4.6e-111) {
		tmp = t_1;
	} else if (t <= 2.4e-87) {
		tmp = b * ((t + y) - 2.0);
	} else if (t <= 1.46e+31) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (x + a) - ((y + (-1.0d0)) * z)
    t_2 = x + (t * (b - a))
    if (t <= (-13600.0d0)) then
        tmp = t_2
    else if (t <= 4.6d-111) then
        tmp = t_1
    else if (t <= 2.4d-87) then
        tmp = b * ((t + y) - 2.0d0)
    else if (t <= 1.46d+31) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + a) - ((y + -1.0) * z);
	double t_2 = x + (t * (b - a));
	double tmp;
	if (t <= -13600.0) {
		tmp = t_2;
	} else if (t <= 4.6e-111) {
		tmp = t_1;
	} else if (t <= 2.4e-87) {
		tmp = b * ((t + y) - 2.0);
	} else if (t <= 1.46e+31) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + a) - ((y + -1.0) * z)
	t_2 = x + (t * (b - a))
	tmp = 0
	if t <= -13600.0:
		tmp = t_2
	elif t <= 4.6e-111:
		tmp = t_1
	elif t <= 2.4e-87:
		tmp = b * ((t + y) - 2.0)
	elif t <= 1.46e+31:
		tmp = t_1
	else:
		tmp = t_2
	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(x + Float64(t * Float64(b - a)))
	tmp = 0.0
	if (t <= -13600.0)
		tmp = t_2;
	elseif (t <= 4.6e-111)
		tmp = t_1;
	elseif (t <= 2.4e-87)
		tmp = Float64(b * Float64(Float64(t + y) - 2.0));
	elseif (t <= 1.46e+31)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + a) - ((y + -1.0) * z);
	t_2 = x + (t * (b - a));
	tmp = 0.0;
	if (t <= -13600.0)
		tmp = t_2;
	elseif (t <= 4.6e-111)
		tmp = t_1;
	elseif (t <= 2.4e-87)
		tmp = b * ((t + y) - 2.0);
	elseif (t <= 1.46e+31)
		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 + a), $MachinePrecision] - N[(N[(y + -1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -13600.0], t$95$2, If[LessEqual[t, 4.6e-111], t$95$1, If[LessEqual[t, 2.4e-87], N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.46e+31], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 4.6 \cdot 10^{-111}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.46 \cdot 10^{+31}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -13600 or 1.46e31 < t

    1. Initial program 92.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-92.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. *-commutative92.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) \]
      3. *-commutative92.8%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg92.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) \]
      5. metadata-eval92.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) \]
      6. remove-double-neg92.8%

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

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

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

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

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

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

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

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

    if -13600 < t < 4.6e-111 or 2.4e-87 < t < 1.46e31

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

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

        \[\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) \]
      3. *-commutative97.5%

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

        \[\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) \]
      5. metadata-eval97.5%

        \[\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) \]
      6. remove-double-neg97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+96.4%

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

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

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

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

    if 4.6e-111 < t < 2.4e-87

    1. Initial program 100.0%

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

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. 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) \]
      5. 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) \]
      6. remove-double-neg100.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -13600:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-111}:\\ \;\;\;\;\left(x + a\right) - \left(y + -1\right) \cdot z\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-87}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;t \leq 1.46 \cdot 10^{+31}:\\ \;\;\;\;\left(x + a\right) - \left(y + -1\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 13: 49.8% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;t \leq -6.2 \cdot 10^{-107}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq -2.7 \cdot 10^{-276}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 110:\\
\;\;\;\;x + a\\

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


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

    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. Step-by-step derivation
      1. associate-+l-93.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. *-commutative93.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) \]
      3. *-commutative93.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg93.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) \]
      5. metadata-eval93.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) \]
      6. remove-double-neg93.0%

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

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

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

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

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

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

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

    if -9e4 < t < -6.20000000000000043e-107 or -2.8000000000000001e-151 < t < -2.69999999999999985e-276

    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. 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. *-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) \]
      3. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. 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) \]
      5. 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) \]
      6. remove-double-neg100.0%

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

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

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

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

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

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

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

    if -6.20000000000000043e-107 < t < -2.8000000000000001e-151 or -2.69999999999999985e-276 < t < 110

    1. Initial program 96.4%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-96.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. *-commutative96.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) \]
      3. *-commutative96.4%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg96.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) \]
      5. metadata-eval96.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) \]
      6. remove-double-neg96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+95.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -90000:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -6.2 \cdot 10^{-107}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-151}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-276}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 110:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 14: 55.3% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;t \leq 3.2 \cdot 10^{-153}:\\
\;\;\;\;x + \left(z + a\right)\\

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

\mathbf{elif}\;t \leq 10^{-62}:\\
\;\;\;\;x + a\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -34000 or 8.00000000000000043e32 < t

    1. Initial program 92.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-92.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. *-commutative92.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) \]
      3. *-commutative92.8%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg92.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) \]
      5. metadata-eval92.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) \]
      6. remove-double-neg92.8%

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

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

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

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

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

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

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

    if -34000 < t < 3.1999999999999999e-153

    1. Initial program 96.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-96.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. *-commutative96.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) \]
      3. *-commutative96.8%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg96.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) \]
      5. metadata-eval96.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) \]
      6. remove-double-neg96.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+96.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    13. Simplified59.9%

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

    if 3.1999999999999999e-153 < t < 6.00000000000000033e-87

    1. Initial program 100.0%

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

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. 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) \]
      5. 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) \]
      6. remove-double-neg100.0%

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

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

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

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

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

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

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

    if 6.00000000000000033e-87 < t < 1e-62

    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. 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. *-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) \]
      3. *-commutative100.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. 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) \]
      5. 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) \]
      6. remove-double-neg100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \color{blue}{\left(\left(0 - -2\right) - y\right)} - a\right) \]
      12. metadata-eval100.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(\color{blue}{2} - y\right) - a\right) \]
    9. Simplified100.0%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(b \cdot \left(2 - y\right) - a\right)} \]
    10. Taylor expanded in b around 0 75.2%

      \[\leadsto \color{blue}{\left(a + x\right) - z \cdot \left(y - 1\right)} \]
    11. Taylor expanded in z around 0 62.8%

      \[\leadsto \color{blue}{a + x} \]

    if 1e-62 < t < 8.00000000000000043e32

    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. associate-+l-99.9%

        \[\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. *-commutative99.9%

        \[\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) \]
      3. *-commutative99.9%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg99.9%

        \[\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) \]
      5. metadata-eval99.9%

        \[\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) \]
      6. remove-double-neg99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in y around inf 61.6%

      \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification66.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -34000:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-153}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-87}:\\ \;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{elif}\;t \leq 10^{-62}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+32}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 15: 35.7% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -125:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 2.45 \cdot 10^{+36}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{+213}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 2.45 \cdot 10^{+246}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -125.0)
   (* t b)
   (if (<= t 2.45e+36)
     (+ x a)
     (if (<= t 9.8e+213) (* t b) (if (<= t 2.45e+246) (* t (- a)) (* t b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -125.0) {
		tmp = t * b;
	} else if (t <= 2.45e+36) {
		tmp = x + a;
	} else if (t <= 9.8e+213) {
		tmp = t * b;
	} else if (t <= 2.45e+246) {
		tmp = t * -a;
	} else {
		tmp = t * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (t <= (-125.0d0)) then
        tmp = t * b
    else if (t <= 2.45d+36) then
        tmp = x + a
    else if (t <= 9.8d+213) then
        tmp = t * b
    else if (t <= 2.45d+246) then
        tmp = t * -a
    else
        tmp = t * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -125.0) {
		tmp = t * b;
	} else if (t <= 2.45e+36) {
		tmp = x + a;
	} else if (t <= 9.8e+213) {
		tmp = t * b;
	} else if (t <= 2.45e+246) {
		tmp = t * -a;
	} else {
		tmp = t * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= -125.0:
		tmp = t * b
	elif t <= 2.45e+36:
		tmp = x + a
	elif t <= 9.8e+213:
		tmp = t * b
	elif t <= 2.45e+246:
		tmp = t * -a
	else:
		tmp = t * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -125.0)
		tmp = Float64(t * b);
	elseif (t <= 2.45e+36)
		tmp = Float64(x + a);
	elseif (t <= 9.8e+213)
		tmp = Float64(t * b);
	elseif (t <= 2.45e+246)
		tmp = Float64(t * Float64(-a));
	else
		tmp = Float64(t * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= -125.0)
		tmp = t * b;
	elseif (t <= 2.45e+36)
		tmp = x + a;
	elseif (t <= 9.8e+213)
		tmp = t * b;
	elseif (t <= 2.45e+246)
		tmp = t * -a;
	else
		tmp = t * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -125.0], N[(t * b), $MachinePrecision], If[LessEqual[t, 2.45e+36], N[(x + a), $MachinePrecision], If[LessEqual[t, 9.8e+213], N[(t * b), $MachinePrecision], If[LessEqual[t, 2.45e+246], N[(t * (-a)), $MachinePrecision], N[(t * b), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -125:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;t \leq 2.45 \cdot 10^{+36}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;t \leq 9.8 \cdot 10^{+213}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;t \leq 2.45 \cdot 10^{+246}:\\
\;\;\;\;t \cdot \left(-a\right)\\

\mathbf{else}:\\
\;\;\;\;t \cdot b\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -125 or 2.4499999999999999e36 < t < 9.79999999999999994e213 or 2.45000000000000014e246 < t

    1. Initial program 94.1%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-94.1%

        \[\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. *-commutative94.1%

        \[\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) \]
      3. *-commutative94.1%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg94.1%

        \[\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) \]
      5. metadata-eval94.1%

        \[\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) \]
      6. remove-double-neg94.1%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg94.1%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg94.1%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval94.1%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+94.1%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified94.1%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in b around inf 59.3%

      \[\leadsto \color{blue}{\left(\left(y + t\right) - 2\right) \cdot b} \]
    5. Taylor expanded in t around inf 53.5%

      \[\leadsto \color{blue}{t \cdot b} \]

    if -125 < t < 2.4499999999999999e36

    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. Step-by-step derivation
      1. associate-+l-97.7%

        \[\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. *-commutative97.7%

        \[\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) \]
      3. *-commutative97.7%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg97.7%

        \[\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) \]
      5. metadata-eval97.7%

        \[\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) \]
      6. remove-double-neg97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified97.7%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in t around 0 97.7%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\left(t \cdot \left(a - b\right) + -1 \cdot a\right) - \left(y - 2\right) \cdot b\right)} \]
    5. Step-by-step derivation
      1. *-commutative97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t \cdot \left(a - b\right) + -1 \cdot a\right) - \color{blue}{b \cdot \left(y - 2\right)}\right) \]
      2. fma-def97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\mathsf{fma}\left(t, a - b, -1 \cdot a\right)} - b \cdot \left(y - 2\right)\right) \]
      3. mul-1-neg97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\mathsf{fma}\left(t, a - b, \color{blue}{-a}\right) - b \cdot \left(y - 2\right)\right) \]
      4. sub-neg97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\mathsf{fma}\left(t, a - b, -a\right) - b \cdot \color{blue}{\left(y + \left(-2\right)\right)}\right) \]
      5. metadata-eval97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\mathsf{fma}\left(t, a - b, -a\right) - b \cdot \left(y + \color{blue}{-2}\right)\right) \]
    6. Simplified97.7%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\mathsf{fma}\left(t, a - b, -a\right) - b \cdot \left(y + -2\right)\right)} \]
    7. Taylor expanded in t around 0 96.6%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{-1 \cdot \left(a + \left(y - 2\right) \cdot b\right)} \]
    8. Step-by-step derivation
      1. mul-1-neg96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(-\left(a + \left(y - 2\right) \cdot b\right)\right)} \]
      2. sub-neg96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(-\left(a + \color{blue}{\left(y + \left(-2\right)\right)} \cdot b\right)\right) \]
      3. metadata-eval96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(-\left(a + \left(y + \color{blue}{-2}\right) \cdot b\right)\right) \]
      4. *-commutative96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(-\left(a + \color{blue}{b \cdot \left(y + -2\right)}\right)\right) \]
      5. distribute-neg-in96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\left(-a\right) + \left(-b \cdot \left(y + -2\right)\right)\right)} \]
      6. +-commutative96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\left(-b \cdot \left(y + -2\right)\right) + \left(-a\right)\right)} \]
      7. sub-neg96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\left(-b \cdot \left(y + -2\right)\right) - a\right)} \]
      8. distribute-rgt-neg-in96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{b \cdot \left(-\left(y + -2\right)\right)} - a\right) \]
      9. neg-sub096.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \color{blue}{\left(0 - \left(y + -2\right)\right)} - a\right) \]
      10. +-commutative96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \color{blue}{\left(\left(0 - -2\right) - y\right)} - a\right) \]
      12. metadata-eval96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(\color{blue}{2} - y\right) - a\right) \]
    9. Simplified96.6%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(b \cdot \left(2 - y\right) - a\right)} \]
    10. Taylor expanded in b around 0 73.1%

      \[\leadsto \color{blue}{\left(a + x\right) - z \cdot \left(y - 1\right)} \]
    11. Taylor expanded in z around 0 41.1%

      \[\leadsto \color{blue}{a + x} \]

    if 9.79999999999999994e213 < t < 2.45000000000000014e246

    1. Initial program 71.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. Step-by-step derivation
      1. associate-+l-71.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. *-commutative71.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) \]
      3. *-commutative71.4%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg71.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) \]
      5. metadata-eval71.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) \]
      6. remove-double-neg71.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg71.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg71.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval71.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+71.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified71.4%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in a around inf 86.1%

      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
    5. Taylor expanded in t around inf 86.1%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot t\right)} \]
    6. Step-by-step derivation
      1. associate-*r*86.1%

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot t} \]
      2. neg-mul-186.1%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot t \]
    7. Simplified86.1%

      \[\leadsto \color{blue}{\left(-a\right) \cdot t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification48.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -125:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 2.45 \cdot 10^{+36}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{+213}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 2.45 \cdot 10^{+246}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 16: 56.3% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -5500:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{-63}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+32}:\\ \;\;\;\;y \cdot \left(b - z\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 -5500.0)
     t_1
     (if (<= t 7.6e-63) (+ x (+ z a)) (if (<= t 3.1e+32) (* y (- b z)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * (b - a);
	double tmp;
	if (t <= -5500.0) {
		tmp = t_1;
	} else if (t <= 7.6e-63) {
		tmp = x + (z + a);
	} else if (t <= 3.1e+32) {
		tmp = y * (b - z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (b - a)
    if (t <= (-5500.0d0)) then
        tmp = t_1
    else if (t <= 7.6d-63) then
        tmp = x + (z + a)
    else if (t <= 3.1d+32) then
        tmp = y * (b - z)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * (b - a);
	double tmp;
	if (t <= -5500.0) {
		tmp = t_1;
	} else if (t <= 7.6e-63) {
		tmp = x + (z + a);
	} else if (t <= 3.1e+32) {
		tmp = y * (b - z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t * (b - a)
	tmp = 0
	if t <= -5500.0:
		tmp = t_1
	elif t <= 7.6e-63:
		tmp = x + (z + a)
	elif t <= 3.1e+32:
		tmp = y * (b - z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -5500.0)
		tmp = t_1;
	elseif (t <= 7.6e-63)
		tmp = Float64(x + Float64(z + a));
	elseif (t <= 3.1e+32)
		tmp = Float64(y * Float64(b - z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t * (b - a);
	tmp = 0.0;
	if (t <= -5500.0)
		tmp = t_1;
	elseif (t <= 7.6e-63)
		tmp = x + (z + a);
	elseif (t <= 3.1e+32)
		tmp = y * (b - z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5500.0], t$95$1, If[LessEqual[t, 7.6e-63], N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e+32], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -5500:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 7.6 \cdot 10^{-63}:\\
\;\;\;\;x + \left(z + a\right)\\

\mathbf{elif}\;t \leq 3.1 \cdot 10^{+32}:\\
\;\;\;\;y \cdot \left(b - z\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5500 or 3.09999999999999993e32 < t

    1. Initial program 92.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-92.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. *-commutative92.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) \]
      3. *-commutative92.8%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg92.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) \]
      5. metadata-eval92.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) \]
      6. remove-double-neg92.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg92.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg92.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval92.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+92.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified92.8%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in t around inf 72.5%

      \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]

    if -5500 < t < 7.60000000000000034e-63

    1. Initial program 97.4%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-97.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. *-commutative97.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) \]
      3. *-commutative97.4%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg97.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) \]
      5. metadata-eval97.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) \]
      6. remove-double-neg97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified97.4%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in t around 0 97.4%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\left(t \cdot \left(a - b\right) + -1 \cdot a\right) - \left(y - 2\right) \cdot b\right)} \]
    5. Step-by-step derivation
      1. *-commutative97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t \cdot \left(a - b\right) + -1 \cdot a\right) - \color{blue}{b \cdot \left(y - 2\right)}\right) \]
      2. fma-def97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\mathsf{fma}\left(t, a - b, -1 \cdot a\right)} - b \cdot \left(y - 2\right)\right) \]
      3. mul-1-neg97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\mathsf{fma}\left(t, a - b, \color{blue}{-a}\right) - b \cdot \left(y - 2\right)\right) \]
      4. sub-neg97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\mathsf{fma}\left(t, a - b, -a\right) - b \cdot \color{blue}{\left(y + \left(-2\right)\right)}\right) \]
      5. metadata-eval97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\mathsf{fma}\left(t, a - b, -a\right) - b \cdot \left(y + \color{blue}{-2}\right)\right) \]
    6. Simplified97.4%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\mathsf{fma}\left(t, a - b, -a\right) - b \cdot \left(y + -2\right)\right)} \]
    7. Taylor expanded in t around 0 97.4%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{-1 \cdot \left(a + \left(y - 2\right) \cdot b\right)} \]
    8. Step-by-step derivation
      1. mul-1-neg97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(-\left(a + \left(y - 2\right) \cdot b\right)\right)} \]
      2. sub-neg97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(-\left(a + \color{blue}{\left(y + \left(-2\right)\right)} \cdot b\right)\right) \]
      3. metadata-eval97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(-\left(a + \left(y + \color{blue}{-2}\right) \cdot b\right)\right) \]
      4. *-commutative97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(-\left(a + \color{blue}{b \cdot \left(y + -2\right)}\right)\right) \]
      5. distribute-neg-in97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\left(-a\right) + \left(-b \cdot \left(y + -2\right)\right)\right)} \]
      6. +-commutative97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\left(-b \cdot \left(y + -2\right)\right) + \left(-a\right)\right)} \]
      7. sub-neg97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\left(-b \cdot \left(y + -2\right)\right) - a\right)} \]
      8. distribute-rgt-neg-in97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{b \cdot \left(-\left(y + -2\right)\right)} - a\right) \]
      9. neg-sub097.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \color{blue}{\left(0 - \left(y + -2\right)\right)} - a\right) \]
      10. +-commutative97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \color{blue}{\left(\left(0 - -2\right) - y\right)} - a\right) \]
      12. metadata-eval97.4%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(\color{blue}{2} - y\right) - a\right) \]
    9. Simplified97.4%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(b \cdot \left(2 - y\right) - a\right)} \]
    10. Taylor expanded in b around 0 75.6%

      \[\leadsto \color{blue}{\left(a + x\right) - z \cdot \left(y - 1\right)} \]
    11. Taylor expanded in y around 0 56.3%

      \[\leadsto \color{blue}{\left(a + x\right) - -1 \cdot z} \]
    12. Step-by-step derivation
      1. +-commutative56.3%

        \[\leadsto \color{blue}{\left(x + a\right)} - -1 \cdot z \]
      2. cancel-sign-sub-inv56.3%

        \[\leadsto \color{blue}{\left(x + a\right) + \left(--1\right) \cdot z} \]
      3. metadata-eval56.3%

        \[\leadsto \left(x + a\right) + \color{blue}{1} \cdot z \]
      4. *-lft-identity56.3%

        \[\leadsto \left(x + a\right) + \color{blue}{z} \]
      5. associate-+l+56.3%

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    13. Simplified56.3%

      \[\leadsto \color{blue}{x + \left(a + z\right)} \]

    if 7.60000000000000034e-63 < t < 3.09999999999999993e32

    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. associate-+l-99.9%

        \[\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. *-commutative99.9%

        \[\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) \]
      3. *-commutative99.9%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg99.9%

        \[\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) \]
      5. metadata-eval99.9%

        \[\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) \]
      6. remove-double-neg99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+99.9%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in y around inf 61.6%

      \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification64.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5500:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{-63}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+32}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 17: 51.0% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -15 \lor \neg \left(t \leq 28\right):\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + a\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= t -15.0) (not (<= t 28.0))) (* t (- b a)) (+ x a)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -15.0) || !(t <= 28.0)) {
		tmp = t * (b - a);
	} else {
		tmp = x + 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 ((t <= (-15.0d0)) .or. (.not. (t <= 28.0d0))) then
        tmp = t * (b - a)
    else
        tmp = x + 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 ((t <= -15.0) || !(t <= 28.0)) {
		tmp = t * (b - a);
	} else {
		tmp = x + a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (t <= -15.0) or not (t <= 28.0):
		tmp = t * (b - a)
	else:
		tmp = x + a
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((t <= -15.0) || !(t <= 28.0))
		tmp = Float64(t * Float64(b - a));
	else
		tmp = Float64(x + a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((t <= -15.0) || ~((t <= 28.0)))
		tmp = t * (b - a);
	else
		tmp = x + a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -15.0], N[Not[LessEqual[t, 28.0]], $MachinePrecision]], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], N[(x + a), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -15 \lor \neg \left(t \leq 28\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\

\mathbf{else}:\\
\;\;\;\;x + a\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -15 or 28 < t

    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. Step-by-step derivation
      1. associate-+l-93.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. *-commutative93.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) \]
      3. *-commutative93.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg93.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) \]
      5. metadata-eval93.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) \]
      6. remove-double-neg93.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg93.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg93.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval93.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+93.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified93.0%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in t around inf 70.3%

      \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]

    if -15 < t < 28

    1. Initial program 97.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-97.6%

        \[\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. *-commutative97.6%

        \[\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) \]
      3. *-commutative97.6%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg97.6%

        \[\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) \]
      5. metadata-eval97.6%

        \[\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) \]
      6. remove-double-neg97.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg97.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg97.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval97.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+97.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified97.6%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in t around 0 97.6%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\left(t \cdot \left(a - b\right) + -1 \cdot a\right) - \left(y - 2\right) \cdot b\right)} \]
    5. Step-by-step derivation
      1. *-commutative97.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t \cdot \left(a - b\right) + -1 \cdot a\right) - \color{blue}{b \cdot \left(y - 2\right)}\right) \]
      2. fma-def97.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\mathsf{fma}\left(t, a - b, -1 \cdot a\right)} - b \cdot \left(y - 2\right)\right) \]
      3. mul-1-neg97.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\mathsf{fma}\left(t, a - b, \color{blue}{-a}\right) - b \cdot \left(y - 2\right)\right) \]
      4. sub-neg97.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\mathsf{fma}\left(t, a - b, -a\right) - b \cdot \color{blue}{\left(y + \left(-2\right)\right)}\right) \]
      5. metadata-eval97.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\mathsf{fma}\left(t, a - b, -a\right) - b \cdot \left(y + \color{blue}{-2}\right)\right) \]
    6. Simplified97.6%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\mathsf{fma}\left(t, a - b, -a\right) - b \cdot \left(y + -2\right)\right)} \]
    7. Taylor expanded in t around 0 97.3%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{-1 \cdot \left(a + \left(y - 2\right) \cdot b\right)} \]
    8. Step-by-step derivation
      1. mul-1-neg97.3%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(-\left(a + \left(y - 2\right) \cdot b\right)\right)} \]
      2. sub-neg97.3%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(-\left(a + \color{blue}{\left(y + \left(-2\right)\right)} \cdot b\right)\right) \]
      3. metadata-eval97.3%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(-\left(a + \left(y + \color{blue}{-2}\right) \cdot b\right)\right) \]
      4. *-commutative97.3%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(-\left(a + \color{blue}{b \cdot \left(y + -2\right)}\right)\right) \]
      5. distribute-neg-in97.3%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\left(-a\right) + \left(-b \cdot \left(y + -2\right)\right)\right)} \]
      6. +-commutative97.3%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\left(-b \cdot \left(y + -2\right)\right) + \left(-a\right)\right)} \]
      7. sub-neg97.3%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\left(-b \cdot \left(y + -2\right)\right) - a\right)} \]
      8. distribute-rgt-neg-in97.3%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{b \cdot \left(-\left(y + -2\right)\right)} - a\right) \]
      9. neg-sub097.3%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \color{blue}{\left(0 - \left(y + -2\right)\right)} - a\right) \]
      10. +-commutative97.3%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+97.3%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \color{blue}{\left(\left(0 - -2\right) - y\right)} - a\right) \]
      12. metadata-eval97.3%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(\color{blue}{2} - y\right) - a\right) \]
    9. Simplified97.3%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(b \cdot \left(2 - y\right) - a\right)} \]
    10. Taylor expanded in b around 0 74.5%

      \[\leadsto \color{blue}{\left(a + x\right) - z \cdot \left(y - 1\right)} \]
    11. Taylor expanded in z around 0 42.3%

      \[\leadsto \color{blue}{a + x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -15 \lor \neg \left(t \leq 28\right):\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + a\\ \end{array} \]

Alternative 18: 25.8% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.4 \cdot 10^{+24}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq 1.95 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= b -3.4e+24) (* t b) (if (<= b 1.95e+28) x (* t b))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -3.4e+24) {
		tmp = t * b;
	} else if (b <= 1.95e+28) {
		tmp = x;
	} else {
		tmp = t * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (b <= (-3.4d+24)) then
        tmp = t * b
    else if (b <= 1.95d+28) then
        tmp = x
    else
        tmp = t * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -3.4e+24) {
		tmp = t * b;
	} else if (b <= 1.95e+28) {
		tmp = x;
	} else {
		tmp = t * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if b <= -3.4e+24:
		tmp = t * b
	elif b <= 1.95e+28:
		tmp = x
	else:
		tmp = t * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (b <= -3.4e+24)
		tmp = Float64(t * b);
	elseif (b <= 1.95e+28)
		tmp = x;
	else
		tmp = Float64(t * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (b <= -3.4e+24)
		tmp = t * b;
	elseif (b <= 1.95e+28)
		tmp = x;
	else
		tmp = t * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.4e+24], N[(t * b), $MachinePrecision], If[LessEqual[b, 1.95e+28], x, N[(t * b), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.4 \cdot 10^{+24}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;b \leq 1.95 \cdot 10^{+28}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t \cdot b\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -3.4000000000000001e24 or 1.9499999999999999e28 < b

    1. Initial program 91.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-91.3%

        \[\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. *-commutative91.3%

        \[\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) \]
      3. *-commutative91.3%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg91.3%

        \[\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) \]
      5. metadata-eval91.3%

        \[\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) \]
      6. remove-double-neg91.3%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg91.3%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg91.3%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval91.3%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+91.3%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified91.3%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in b around inf 76.9%

      \[\leadsto \color{blue}{\left(\left(y + t\right) - 2\right) \cdot b} \]
    5. Taylor expanded in t around inf 48.5%

      \[\leadsto \color{blue}{t \cdot b} \]

    if -3.4000000000000001e24 < b < 1.9499999999999999e28

    1. Initial program 99.2%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-99.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. *-commutative99.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) \]
      3. *-commutative99.2%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg99.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) \]
      5. metadata-eval99.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) \]
      6. remove-double-neg99.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg99.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg99.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval99.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+99.2%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified99.2%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in x around inf 30.9%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.4 \cdot 10^{+24}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq 1.95 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 19: 35.5% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -125:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+32}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -125.0) (* t b) (if (<= t 6e+32) (+ x a) (* t b))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -125.0) {
		tmp = t * b;
	} else if (t <= 6e+32) {
		tmp = x + a;
	} else {
		tmp = t * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (t <= (-125.0d0)) then
        tmp = t * b
    else if (t <= 6d+32) then
        tmp = x + a
    else
        tmp = t * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -125.0) {
		tmp = t * b;
	} else if (t <= 6e+32) {
		tmp = x + a;
	} else {
		tmp = t * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= -125.0:
		tmp = t * b
	elif t <= 6e+32:
		tmp = x + a
	else:
		tmp = t * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -125.0)
		tmp = Float64(t * b);
	elseif (t <= 6e+32)
		tmp = Float64(x + a);
	else
		tmp = Float64(t * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= -125.0)
		tmp = t * b;
	elseif (t <= 6e+32)
		tmp = x + a;
	else
		tmp = t * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -125.0], N[(t * b), $MachinePrecision], If[LessEqual[t, 6e+32], N[(x + a), $MachinePrecision], N[(t * b), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -125:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;t \leq 6 \cdot 10^{+32}:\\
\;\;\;\;x + a\\

\mathbf{else}:\\
\;\;\;\;t \cdot b\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -125 or 6e32 < t

    1. Initial program 92.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-92.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. *-commutative92.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) \]
      3. *-commutative92.8%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg92.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) \]
      5. metadata-eval92.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) \]
      6. remove-double-neg92.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg92.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg92.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval92.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+92.8%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified92.8%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in b around inf 56.9%

      \[\leadsto \color{blue}{\left(\left(y + t\right) - 2\right) \cdot b} \]
    5. Taylor expanded in t around inf 50.6%

      \[\leadsto \color{blue}{t \cdot b} \]

    if -125 < t < 6e32

    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. Step-by-step derivation
      1. associate-+l-97.7%

        \[\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. *-commutative97.7%

        \[\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) \]
      3. *-commutative97.7%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg97.7%

        \[\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) \]
      5. metadata-eval97.7%

        \[\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) \]
      6. remove-double-neg97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified97.7%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in t around 0 97.7%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\left(t \cdot \left(a - b\right) + -1 \cdot a\right) - \left(y - 2\right) \cdot b\right)} \]
    5. Step-by-step derivation
      1. *-commutative97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t \cdot \left(a - b\right) + -1 \cdot a\right) - \color{blue}{b \cdot \left(y - 2\right)}\right) \]
      2. fma-def97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\mathsf{fma}\left(t, a - b, -1 \cdot a\right)} - b \cdot \left(y - 2\right)\right) \]
      3. mul-1-neg97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\mathsf{fma}\left(t, a - b, \color{blue}{-a}\right) - b \cdot \left(y - 2\right)\right) \]
      4. sub-neg97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\mathsf{fma}\left(t, a - b, -a\right) - b \cdot \color{blue}{\left(y + \left(-2\right)\right)}\right) \]
      5. metadata-eval97.7%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\mathsf{fma}\left(t, a - b, -a\right) - b \cdot \left(y + \color{blue}{-2}\right)\right) \]
    6. Simplified97.7%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\mathsf{fma}\left(t, a - b, -a\right) - b \cdot \left(y + -2\right)\right)} \]
    7. Taylor expanded in t around 0 96.6%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{-1 \cdot \left(a + \left(y - 2\right) \cdot b\right)} \]
    8. Step-by-step derivation
      1. mul-1-neg96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(-\left(a + \left(y - 2\right) \cdot b\right)\right)} \]
      2. sub-neg96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(-\left(a + \color{blue}{\left(y + \left(-2\right)\right)} \cdot b\right)\right) \]
      3. metadata-eval96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(-\left(a + \left(y + \color{blue}{-2}\right) \cdot b\right)\right) \]
      4. *-commutative96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(-\left(a + \color{blue}{b \cdot \left(y + -2\right)}\right)\right) \]
      5. distribute-neg-in96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\left(-a\right) + \left(-b \cdot \left(y + -2\right)\right)\right)} \]
      6. +-commutative96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\left(-b \cdot \left(y + -2\right)\right) + \left(-a\right)\right)} \]
      7. sub-neg96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(\left(-b \cdot \left(y + -2\right)\right) - a\right)} \]
      8. distribute-rgt-neg-in96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{b \cdot \left(-\left(y + -2\right)\right)} - a\right) \]
      9. neg-sub096.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \color{blue}{\left(0 - \left(y + -2\right)\right)} - a\right) \]
      10. +-commutative96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(0 - \color{blue}{\left(-2 + y\right)}\right) - a\right) \]
      11. associate--r+96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \color{blue}{\left(\left(0 - -2\right) - y\right)} - a\right) \]
      12. metadata-eval96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(b \cdot \left(\color{blue}{2} - y\right) - a\right) \]
    9. Simplified96.6%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \color{blue}{\left(b \cdot \left(2 - y\right) - a\right)} \]
    10. Taylor expanded in b around 0 73.1%

      \[\leadsto \color{blue}{\left(a + x\right) - z \cdot \left(y - 1\right)} \]
    11. Taylor expanded in z around 0 41.1%

      \[\leadsto \color{blue}{a + x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification45.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -125:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+32}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 20: 20.7% accurate, 4.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -8.2 \cdot 10^{+234}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+80}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -8.2e+234) a (if (<= a 2.8e+80) x a)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -8.2e+234) {
		tmp = a;
	} else if (a <= 2.8e+80) {
		tmp = x;
	} 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 (a <= (-8.2d+234)) then
        tmp = a
    else if (a <= 2.8d+80) then
        tmp = x
    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 (a <= -8.2e+234) {
		tmp = a;
	} else if (a <= 2.8e+80) {
		tmp = x;
	} else {
		tmp = a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -8.2e+234:
		tmp = a
	elif a <= 2.8e+80:
		tmp = x
	else:
		tmp = a
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -8.2e+234)
		tmp = a;
	elseif (a <= 2.8e+80)
		tmp = x;
	else
		tmp = a;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (a <= -8.2e+234)
		tmp = a;
	elseif (a <= 2.8e+80)
		tmp = x;
	else
		tmp = a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -8.2e+234], a, If[LessEqual[a, 2.8e+80], x, a]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.2 \cdot 10^{+234}:\\
\;\;\;\;a\\

\mathbf{elif}\;a \leq 2.8 \cdot 10^{+80}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;a\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.19999999999999948e234 or 2.79999999999999984e80 < a

    1. Initial program 90.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-90.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. *-commutative90.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) \]
      3. *-commutative90.0%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg90.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) \]
      5. metadata-eval90.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) \]
      6. remove-double-neg90.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg90.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg90.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval90.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+90.0%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified90.0%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in a around inf 67.0%

      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
    5. Taylor expanded in t around 0 39.1%

      \[\leadsto \color{blue}{a} \]

    if -8.19999999999999948e234 < a < 2.79999999999999984e80

    1. Initial program 96.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l-96.6%

        \[\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. *-commutative96.6%

        \[\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) \]
      3. *-commutative96.6%

        \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      4. sub-neg96.6%

        \[\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) \]
      5. metadata-eval96.6%

        \[\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) \]
      6. remove-double-neg96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      7. remove-double-neg96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      8. sub-neg96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      9. metadata-eval96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
      10. associate--l+96.6%

        \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
    3. Simplified96.6%

      \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
    4. Taylor expanded in x around inf 21.4%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification24.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.2 \cdot 10^{+234}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+80}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 21: 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 95.3%

    \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
  2. Step-by-step derivation
    1. associate-+l-95.3%

      \[\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. *-commutative95.3%

      \[\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) \]
    3. *-commutative95.3%

      \[\leadsto \left(x - \color{blue}{\left(y - 1\right) \cdot z}\right) - \left(\left(t - 1\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
    4. sub-neg95.3%

      \[\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) \]
    5. metadata-eval95.3%

      \[\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) \]
    6. remove-double-neg95.3%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(-\left(-\left(t - 1\right)\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
    7. remove-double-neg95.3%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t - 1\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
    8. sub-neg95.3%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\color{blue}{\left(t + \left(-1\right)\right)} \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
    9. metadata-eval95.3%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + \color{blue}{-1}\right) \cdot a - \left(\left(y + t\right) - 2\right) \cdot b\right) \]
    10. associate--l+95.3%

      \[\leadsto \left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \color{blue}{\left(y + \left(t - 2\right)\right)} \cdot b\right) \]
  3. Simplified95.3%

    \[\leadsto \color{blue}{\left(x - \left(y + -1\right) \cdot z\right) - \left(\left(t + -1\right) \cdot a - \left(y + \left(t - 2\right)\right) \cdot b\right)} \]
  4. Taylor expanded in a around inf 24.1%

    \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
  5. Taylor expanded in t around 0 10.3%

    \[\leadsto \color{blue}{a} \]
  6. Final simplification10.3%

    \[\leadsto a \]

Reproduce

?
herbie shell --seed 2023196 
(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)))