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

Percentage Accurate: 95.3% → 97.9%
Time: 13.4s
Alternatives: 12
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 12 alternatives:

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

Initial Program: 95.3% accurate, 1.0× speedup?

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

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

Alternative 1: 97.9% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

        \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - a \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(1\right)\right)\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      5. distribute-rgt-inN/A

        \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \color{blue}{\left(t \cdot a + \left(\mathsf{neg}\left(1\right)\right) \cdot a\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      6. lower-fma.f64N/A

        \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \color{blue}{\mathsf{fma}\left(t, a, \left(\mathsf{neg}\left(1\right)\right) \cdot a\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      7. lower-*.f64N/A

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

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

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

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

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
      2. lower--.f6466.7

        \[\leadsto t \cdot \color{blue}{\left(b - a\right)} \]
    5. Applied rewrites66.7%

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

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

Alternative 2: 97.9% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
      2. lower--.f6466.7

        \[\leadsto t \cdot \color{blue}{\left(b - a\right)} \]
    5. Applied rewrites66.7%

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

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

Alternative 3: 87.4% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;b \leq 5.1 \cdot 10^{-67}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(z, 1 - y, x\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -3.80000000000000004e40 or 5.09999999999999982e-67 < b

    1. Initial program 95.3%

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

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - a \cdot \left(t - 1\right)} \]
    4. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right)} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      5. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(a, -1 \cdot \left(t + \color{blue}{-1}\right), x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      8. distribute-lft-inN/A

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

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

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 + -1 \cdot t}, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      11. neg-mul-1N/A

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

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 - t}, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      13. lower--.f64N/A

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

        \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
      15. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{\mathsf{fma}\left(b, \left(t + y\right) - 2, x\right)}\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, \color{blue}{\left(y + t\right)} - 2, x\right)\right) \]
      17. associate-+r-N/A

        \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, \color{blue}{y + \left(t - 2\right)}, x\right)\right) \]
      18. lower-+.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, \color{blue}{y + \left(t - 2\right)}, x\right)\right) \]
      19. sub-negN/A

        \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}, x\right)\right) \]
      20. lower-+.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}, x\right)\right) \]
      21. metadata-eval90.2

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

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

    if -3.80000000000000004e40 < b < 5.09999999999999982e-67

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{\left(x - a \cdot \left(t - 1\right)\right) - z \cdot \left(y - 1\right)} \]
      2. sub-negN/A

        \[\leadsto \color{blue}{\left(x + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)\right)} - z \cdot \left(y - 1\right) \]
      3. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + x\right)} - z \cdot \left(y - 1\right) \]
      4. associate-+r-N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x - z \cdot \left(y - 1\right)\right)} \]
      5. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right)} + \left(x - z \cdot \left(y - 1\right)\right) \]
      6. mul-1-negN/A

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} + \left(x - z \cdot \left(y - 1\right)\right) \]
      7. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, -1 \cdot \left(t - 1\right), x - z \cdot \left(y - 1\right)\right)} \]
      8. sub-negN/A

        \[\leadsto \mathsf{fma}\left(a, -1 \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(1\right)\right)\right)}, x - z \cdot \left(y - 1\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(a, -1 \cdot \left(t + \color{blue}{-1}\right), x - z \cdot \left(y - 1\right)\right) \]
      10. distribute-lft-inN/A

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{-1 \cdot t + -1 \cdot -1}, x - z \cdot \left(y - 1\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(a, -1 \cdot t + \color{blue}{1}, x - z \cdot \left(y - 1\right)\right) \]
      12. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 + -1 \cdot t}, x - z \cdot \left(y - 1\right)\right) \]
      13. neg-mul-1N/A

        \[\leadsto \mathsf{fma}\left(a, 1 + \color{blue}{\left(\mathsf{neg}\left(t\right)\right)}, x - z \cdot \left(y - 1\right)\right) \]
      14. sub-negN/A

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 - t}, x - z \cdot \left(y - 1\right)\right) \]
      15. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 - t}, x - z \cdot \left(y - 1\right)\right) \]
      16. sub-negN/A

        \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{x + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)}\right) \]
      17. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{\left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right) + x}\right) \]
      18. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{z \cdot \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right)} + x\right) \]
      19. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(a, 1 - t, z \cdot \color{blue}{\left(-1 \cdot \left(y - 1\right)\right)} + x\right) \]
      20. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{\mathsf{fma}\left(z, -1 \cdot \left(y - 1\right), x\right)}\right) \]
    5. Applied rewrites94.5%

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

Alternative 4: 83.6% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;b \leq 7 \cdot 10^{+72}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(z, 1 - y, x\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -8.5e121 or 7.0000000000000002e72 < b

    1. Initial program 94.7%

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

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - a \cdot \left(t - 1\right)} \]
    4. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right)} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      5. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(a, -1 \cdot \left(t + \color{blue}{-1}\right), x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      8. distribute-lft-inN/A

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

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

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 + -1 \cdot t}, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      11. neg-mul-1N/A

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

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 - t}, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
      13. lower--.f64N/A

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

        \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
      15. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{\mathsf{fma}\left(b, \left(t + y\right) - 2, x\right)}\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, \color{blue}{\left(y + t\right)} - 2, x\right)\right) \]
      17. associate-+r-N/A

        \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, \color{blue}{y + \left(t - 2\right)}, x\right)\right) \]
      18. lower-+.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, \color{blue}{y + \left(t - 2\right)}, x\right)\right) \]
      19. sub-negN/A

        \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}, x\right)\right) \]
      20. lower-+.f64N/A

        \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}, x\right)\right) \]
      21. metadata-eval96.2

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

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

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

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

      if -8.5e121 < b < 7.0000000000000002e72

      1. Initial program 98.9%

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

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

          \[\leadsto \color{blue}{\left(x - a \cdot \left(t - 1\right)\right) - z \cdot \left(y - 1\right)} \]
        2. sub-negN/A

          \[\leadsto \color{blue}{\left(x + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)\right)} - z \cdot \left(y - 1\right) \]
        3. +-commutativeN/A

          \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + x\right)} - z \cdot \left(y - 1\right) \]
        4. associate-+r-N/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x - z \cdot \left(y - 1\right)\right)} \]
        5. distribute-rgt-neg-inN/A

          \[\leadsto \color{blue}{a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right)} + \left(x - z \cdot \left(y - 1\right)\right) \]
        6. mul-1-negN/A

          \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} + \left(x - z \cdot \left(y - 1\right)\right) \]
        7. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(a, -1 \cdot \left(t - 1\right), x - z \cdot \left(y - 1\right)\right)} \]
        8. sub-negN/A

          \[\leadsto \mathsf{fma}\left(a, -1 \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(1\right)\right)\right)}, x - z \cdot \left(y - 1\right)\right) \]
        9. metadata-evalN/A

          \[\leadsto \mathsf{fma}\left(a, -1 \cdot \left(t + \color{blue}{-1}\right), x - z \cdot \left(y - 1\right)\right) \]
        10. distribute-lft-inN/A

          \[\leadsto \mathsf{fma}\left(a, \color{blue}{-1 \cdot t + -1 \cdot -1}, x - z \cdot \left(y - 1\right)\right) \]
        11. metadata-evalN/A

          \[\leadsto \mathsf{fma}\left(a, -1 \cdot t + \color{blue}{1}, x - z \cdot \left(y - 1\right)\right) \]
        12. +-commutativeN/A

          \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 + -1 \cdot t}, x - z \cdot \left(y - 1\right)\right) \]
        13. neg-mul-1N/A

          \[\leadsto \mathsf{fma}\left(a, 1 + \color{blue}{\left(\mathsf{neg}\left(t\right)\right)}, x - z \cdot \left(y - 1\right)\right) \]
        14. sub-negN/A

          \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 - t}, x - z \cdot \left(y - 1\right)\right) \]
        15. lower--.f64N/A

          \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 - t}, x - z \cdot \left(y - 1\right)\right) \]
        16. sub-negN/A

          \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{x + \left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right)}\right) \]
        17. +-commutativeN/A

          \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{\left(\mathsf{neg}\left(z \cdot \left(y - 1\right)\right)\right) + x}\right) \]
        18. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{z \cdot \left(\mathsf{neg}\left(\left(y - 1\right)\right)\right)} + x\right) \]
        19. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(a, 1 - t, z \cdot \color{blue}{\left(-1 \cdot \left(y - 1\right)\right)} + x\right) \]
        20. lower-fma.f64N/A

          \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{\mathsf{fma}\left(z, -1 \cdot \left(y - 1\right), x\right)}\right) \]
      5. Applied rewrites88.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(z, 1 - y, x\right)\right)} \]
    8. Recombined 2 regimes into one program.
    9. Add Preprocessing

    Alternative 5: 43.4% accurate, 1.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(-a\right)\\ \mathbf{if}\;t \leq -1.1 \cdot 10^{+76}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 10000000000000:\\ \;\;\;\;a + \left(x + z\right)\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{+144}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (* t (- a))))
       (if (<= t -1.1e+76)
         t_1
         (if (<= t 10000000000000.0)
           (+ a (+ x z))
           (if (<= t 6.5e+144) t_1 (* t b))))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = t * -a;
    	double tmp;
    	if (t <= -1.1e+76) {
    		tmp = t_1;
    	} else if (t <= 10000000000000.0) {
    		tmp = a + (x + z);
    	} else if (t <= 6.5e+144) {
    		tmp = t_1;
    	} 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) :: t_1
        real(8) :: tmp
        t_1 = t * -a
        if (t <= (-1.1d+76)) then
            tmp = t_1
        else if (t <= 10000000000000.0d0) then
            tmp = a + (x + z)
        else if (t <= 6.5d+144) then
            tmp = t_1
        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 t_1 = t * -a;
    	double tmp;
    	if (t <= -1.1e+76) {
    		tmp = t_1;
    	} else if (t <= 10000000000000.0) {
    		tmp = a + (x + z);
    	} else if (t <= 6.5e+144) {
    		tmp = t_1;
    	} else {
    		tmp = t * b;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	t_1 = t * -a
    	tmp = 0
    	if t <= -1.1e+76:
    		tmp = t_1
    	elif t <= 10000000000000.0:
    		tmp = a + (x + z)
    	elif t <= 6.5e+144:
    		tmp = t_1
    	else:
    		tmp = t * b
    	return tmp
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(t * Float64(-a))
    	tmp = 0.0
    	if (t <= -1.1e+76)
    		tmp = t_1;
    	elseif (t <= 10000000000000.0)
    		tmp = Float64(a + Float64(x + z));
    	elseif (t <= 6.5e+144)
    		tmp = t_1;
    	else
    		tmp = Float64(t * b);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	t_1 = t * -a;
    	tmp = 0.0;
    	if (t <= -1.1e+76)
    		tmp = t_1;
    	elseif (t <= 10000000000000.0)
    		tmp = a + (x + z);
    	elseif (t <= 6.5e+144)
    		tmp = t_1;
    	else
    		tmp = t * b;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * (-a)), $MachinePrecision]}, If[LessEqual[t, -1.1e+76], t$95$1, If[LessEqual[t, 10000000000000.0], N[(a + N[(x + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.5e+144], t$95$1, N[(t * b), $MachinePrecision]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := t \cdot \left(-a\right)\\
    \mathbf{if}\;t \leq -1.1 \cdot 10^{+76}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq 10000000000000:\\
    \;\;\;\;a + \left(x + z\right)\\
    
    \mathbf{elif}\;t \leq 6.5 \cdot 10^{+144}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{else}:\\
    \;\;\;\;t \cdot b\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if t < -1.1e76 or 1e13 < t < 6.50000000000000007e144

      1. Initial program 93.2%

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

        \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
      4. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
        2. lower--.f6474.0

          \[\leadsto t \cdot \color{blue}{\left(b - a\right)} \]
      5. Applied rewrites74.0%

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

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

          \[\leadsto t \cdot \left(-a\right) \]

        if -1.1e76 < t < 1e13

        1. Initial program 99.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-*.f64N/A

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

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

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

            \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - a \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(1\right)\right)\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
          5. distribute-rgt-inN/A

            \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \color{blue}{\left(t \cdot a + \left(\mathsf{neg}\left(1\right)\right) \cdot a\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
          6. lower-fma.f64N/A

            \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \color{blue}{\mathsf{fma}\left(t, a, \left(\mathsf{neg}\left(1\right)\right) \cdot a\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
          7. lower-*.f64N/A

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

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

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

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

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

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

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

            \[\leadsto a + \left(x + z\right) \]
          3. Step-by-step derivation
            1. Applied rewrites54.8%

              \[\leadsto a + \left(z + x\right) \]

            if 6.50000000000000007e144 < t

            1. Initial program 100.0%

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

              \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
            4. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
              2. lower--.f6485.6

                \[\leadsto t \cdot \color{blue}{\left(b - a\right)} \]
            5. Applied rewrites85.6%

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{+76}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;t \leq 10000000000000:\\ \;\;\;\;a + \left(x + z\right)\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{+144}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
            10. Add Preprocessing

            Alternative 6: 67.7% accurate, 1.5× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -1.5 \cdot 10^{+124}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{+14}:\\ \;\;\;\;a + \mathsf{fma}\left(z, 1 - y, x\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 -1.5e+124)
                 t_1
                 (if (<= t 2.2e+14) (+ a (fma z (- 1.0 y) x)) 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 <= -1.5e+124) {
            		tmp = t_1;
            	} else if (t <= 2.2e+14) {
            		tmp = a + fma(z, (1.0 - y), x);
            	} 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 <= -1.5e+124)
            		tmp = t_1;
            	elseif (t <= 2.2e+14)
            		tmp = Float64(a + fma(z, Float64(1.0 - y), x));
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.5e+124], t$95$1, If[LessEqual[t, 2.2e+14], N[(a + N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := t \cdot \left(b - a\right)\\
            \mathbf{if}\;t \leq -1.5 \cdot 10^{+124}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;t \leq 2.2 \cdot 10^{+14}:\\
            \;\;\;\;a + \mathsf{fma}\left(z, 1 - y, x\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if t < -1.5e124 or 2.2e14 < t

              1. Initial program 95.0%

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

                \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
              4. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                2. lower--.f6479.7

                  \[\leadsto t \cdot \color{blue}{\left(b - a\right)} \]
              5. Applied rewrites79.7%

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

              if -1.5e124 < t < 2.2e14

              1. Initial program 99.3%

                \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. lift-*.f64N/A

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

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

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

                  \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - a \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(1\right)\right)\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                5. distribute-rgt-inN/A

                  \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \color{blue}{\left(t \cdot a + \left(\mathsf{neg}\left(1\right)\right) \cdot a\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                6. lower-fma.f64N/A

                  \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \color{blue}{\mathsf{fma}\left(t, a, \left(\mathsf{neg}\left(1\right)\right) \cdot a\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                7. lower-*.f64N/A

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

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

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

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

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

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

                  \[\leadsto a + \color{blue}{\mathsf{fma}\left(z, 1 - y, x\right)} \]
              9. Recombined 2 regimes into one program.
              10. Add Preprocessing

              Alternative 7: 66.2% accurate, 1.5× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -3.9 \cdot 10^{+76}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4400000000000:\\ \;\;\;\;a + \mathsf{fma}\left(b, y + -2, x\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 -3.9e+76)
                   t_1
                   (if (<= t 4400000000000.0) (+ a (fma b (+ y -2.0) x)) 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 <= -3.9e+76) {
              		tmp = t_1;
              	} else if (t <= 4400000000000.0) {
              		tmp = a + fma(b, (y + -2.0), x);
              	} 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 <= -3.9e+76)
              		tmp = t_1;
              	elseif (t <= 4400000000000.0)
              		tmp = Float64(a + fma(b, Float64(y + -2.0), x));
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.9e+76], t$95$1, If[LessEqual[t, 4400000000000.0], N[(a + N[(b * N[(y + -2.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := t \cdot \left(b - a\right)\\
              \mathbf{if}\;t \leq -3.9 \cdot 10^{+76}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;t \leq 4400000000000:\\
              \;\;\;\;a + \mathsf{fma}\left(b, y + -2, x\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if t < -3.89999999999999989e76 or 4.4e12 < t

                1. Initial program 95.3%

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

                  \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                4. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                  2. lower--.f6478.3

                    \[\leadsto t \cdot \color{blue}{\left(b - a\right)} \]
                5. Applied rewrites78.3%

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

                if -3.89999999999999989e76 < t < 4.4e12

                1. Initial program 99.3%

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

                  \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - a \cdot \left(t - 1\right)} \]
                4. Step-by-step derivation
                  1. sub-negN/A

                    \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
                  2. +-commutativeN/A

                    \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                  3. distribute-rgt-neg-inN/A

                    \[\leadsto \color{blue}{a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right)} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                  4. mul-1-negN/A

                    \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                  5. lower-fma.f64N/A

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

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

                    \[\leadsto \mathsf{fma}\left(a, -1 \cdot \left(t + \color{blue}{-1}\right), x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                  8. distribute-lft-inN/A

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

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

                    \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 + -1 \cdot t}, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                  11. neg-mul-1N/A

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

                    \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 - t}, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                  13. lower--.f64N/A

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

                    \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
                  15. lower-fma.f64N/A

                    \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{\mathsf{fma}\left(b, \left(t + y\right) - 2, x\right)}\right) \]
                  16. +-commutativeN/A

                    \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, \color{blue}{\left(y + t\right)} - 2, x\right)\right) \]
                  17. associate-+r-N/A

                    \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, \color{blue}{y + \left(t - 2\right)}, x\right)\right) \]
                  18. lower-+.f64N/A

                    \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, \color{blue}{y + \left(t - 2\right)}, x\right)\right) \]
                  19. sub-negN/A

                    \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}, x\right)\right) \]
                  20. lower-+.f64N/A

                    \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}, x\right)\right) \]
                  21. metadata-eval73.0

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

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

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

                    \[\leadsto a + \color{blue}{\mathsf{fma}\left(b, y + -2, x\right)} \]
                8. Recombined 2 regimes into one program.
                9. Add Preprocessing

                Alternative 8: 61.3% accurate, 1.5× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(y + \left(t + -2\right)\right)\\ \mathbf{if}\;b \leq -1.45 \cdot 10^{+97}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 2.55 \cdot 10^{+66}:\\ \;\;\;\;\mathsf{fma}\left(a, 1 - t, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                (FPCore (x y z t a b)
                 :precision binary64
                 (let* ((t_1 (* b (+ y (+ t -2.0)))))
                   (if (<= b -1.45e+97) t_1 (if (<= b 2.55e+66) (fma a (- 1.0 t) x) t_1))))
                double code(double x, double y, double z, double t, double a, double b) {
                	double t_1 = b * (y + (t + -2.0));
                	double tmp;
                	if (b <= -1.45e+97) {
                		tmp = t_1;
                	} else if (b <= 2.55e+66) {
                		tmp = fma(a, (1.0 - t), x);
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a, b)
                	t_1 = Float64(b * Float64(y + Float64(t + -2.0)))
                	tmp = 0.0
                	if (b <= -1.45e+97)
                		tmp = t_1;
                	elseif (b <= 2.55e+66)
                		tmp = fma(a, Float64(1.0 - t), x);
                	else
                		tmp = t_1;
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.45e+97], t$95$1, If[LessEqual[b, 2.55e+66], N[(a * N[(1.0 - t), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := b \cdot \left(y + \left(t + -2\right)\right)\\
                \mathbf{if}\;b \leq -1.45 \cdot 10^{+97}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;b \leq 2.55 \cdot 10^{+66}:\\
                \;\;\;\;\mathsf{fma}\left(a, 1 - t, x\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if b < -1.44999999999999994e97 or 2.55000000000000004e66 < b

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

                    \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right)} \]
                  4. Step-by-step derivation
                    1. lower-*.f64N/A

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

                      \[\leadsto b \cdot \left(\color{blue}{\left(y + t\right)} - 2\right) \]
                    3. associate-+r-N/A

                      \[\leadsto b \cdot \color{blue}{\left(y + \left(t - 2\right)\right)} \]
                    4. lower-+.f64N/A

                      \[\leadsto b \cdot \color{blue}{\left(y + \left(t - 2\right)\right)} \]
                    5. sub-negN/A

                      \[\leadsto b \cdot \left(y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}\right) \]
                    6. lower-+.f64N/A

                      \[\leadsto b \cdot \left(y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}\right) \]
                    7. metadata-eval83.7

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

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

                  if -1.44999999999999994e97 < b < 2.55000000000000004e66

                  1. Initial program 99.4%

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

                    \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - a \cdot \left(t - 1\right)} \]
                  4. Step-by-step derivation
                    1. sub-negN/A

                      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
                    2. +-commutativeN/A

                      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                    3. distribute-rgt-neg-inN/A

                      \[\leadsto \color{blue}{a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right)} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                    4. mul-1-negN/A

                      \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                    5. lower-fma.f64N/A

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

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

                      \[\leadsto \mathsf{fma}\left(a, -1 \cdot \left(t + \color{blue}{-1}\right), x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                    8. distribute-lft-inN/A

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

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

                      \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 + -1 \cdot t}, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                    11. neg-mul-1N/A

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

                      \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 - t}, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                    13. lower--.f64N/A

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

                      \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
                    15. lower-fma.f64N/A

                      \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{\mathsf{fma}\left(b, \left(t + y\right) - 2, x\right)}\right) \]
                    16. +-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, \color{blue}{\left(y + t\right)} - 2, x\right)\right) \]
                    17. associate-+r-N/A

                      \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, \color{blue}{y + \left(t - 2\right)}, x\right)\right) \]
                    18. lower-+.f64N/A

                      \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, \color{blue}{y + \left(t - 2\right)}, x\right)\right) \]
                    19. sub-negN/A

                      \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}, x\right)\right) \]
                    20. lower-+.f64N/A

                      \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}, x\right)\right) \]
                    21. metadata-eval72.2

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

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

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

                      \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 - t}, x\right) \]
                  8. Recombined 2 regimes into one program.
                  9. Add Preprocessing

                  Alternative 9: 57.4% accurate, 1.8× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -3.5 \cdot 10^{+24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 8000000000000:\\ \;\;\;\;a + \left(x + 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 -3.5e+24) t_1 (if (<= t 8000000000000.0) (+ a (+ x 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 <= -3.5e+24) {
                  		tmp = t_1;
                  	} else if (t <= 8000000000000.0) {
                  		tmp = a + (x + z);
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(x, y, z, t, a, b)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      real(8), intent (in) :: b
                      real(8) :: t_1
                      real(8) :: tmp
                      t_1 = t * (b - a)
                      if (t <= (-3.5d+24)) then
                          tmp = t_1
                      else if (t <= 8000000000000.0d0) then
                          tmp = a + (x + z)
                      else
                          tmp = t_1
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b) {
                  	double t_1 = t * (b - a);
                  	double tmp;
                  	if (t <= -3.5e+24) {
                  		tmp = t_1;
                  	} else if (t <= 8000000000000.0) {
                  		tmp = a + (x + z);
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a, b):
                  	t_1 = t * (b - a)
                  	tmp = 0
                  	if t <= -3.5e+24:
                  		tmp = t_1
                  	elif t <= 8000000000000.0:
                  		tmp = a + (x + 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 <= -3.5e+24)
                  		tmp = t_1;
                  	elseif (t <= 8000000000000.0)
                  		tmp = Float64(a + Float64(x + 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 <= -3.5e+24)
                  		tmp = t_1;
                  	elseif (t <= 8000000000000.0)
                  		tmp = a + (x + 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, -3.5e+24], t$95$1, If[LessEqual[t, 8000000000000.0], N[(a + N[(x + z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := t \cdot \left(b - a\right)\\
                  \mathbf{if}\;t \leq -3.5 \cdot 10^{+24}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;t \leq 8000000000000:\\
                  \;\;\;\;a + \left(x + z\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if t < -3.5000000000000002e24 or 8e12 < t

                    1. Initial program 95.8%

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

                      \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                    4. Step-by-step derivation
                      1. lower-*.f64N/A

                        \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                      2. lower--.f6474.8

                        \[\leadsto t \cdot \color{blue}{\left(b - a\right)} \]
                    5. Applied rewrites74.8%

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

                    if -3.5000000000000002e24 < t < 8e12

                    1. Initial program 99.3%

                      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                    2. Add Preprocessing
                    3. Step-by-step derivation
                      1. lift-*.f64N/A

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

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

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

                        \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - a \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(1\right)\right)\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                      5. distribute-rgt-inN/A

                        \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \color{blue}{\left(t \cdot a + \left(\mathsf{neg}\left(1\right)\right) \cdot a\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                      6. lower-fma.f64N/A

                        \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \color{blue}{\mathsf{fma}\left(t, a, \left(\mathsf{neg}\left(1\right)\right) \cdot a\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                      7. lower-*.f64N/A

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

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

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

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

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

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

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

                        \[\leadsto a + \left(x + z\right) \]
                      3. Step-by-step derivation
                        1. Applied rewrites57.2%

                          \[\leadsto a + \left(z + x\right) \]
                      4. Recombined 2 regimes into one program.
                      5. Final simplification65.4%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.5 \cdot 10^{+24}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 8000000000000:\\ \;\;\;\;a + \left(x + z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
                      6. Add Preprocessing

                      Alternative 10: 42.3% accurate, 1.9× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+30}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 41000000000000:\\ \;\;\;\;a + \left(x + z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b)
                       :precision binary64
                       (if (<= t -7.5e+30)
                         (* t b)
                         (if (<= t 41000000000000.0) (+ a (+ x z)) (* t b))))
                      double code(double x, double y, double z, double t, double a, double b) {
                      	double tmp;
                      	if (t <= -7.5e+30) {
                      		tmp = t * b;
                      	} else if (t <= 41000000000000.0) {
                      		tmp = a + (x + z);
                      	} else {
                      		tmp = t * b;
                      	}
                      	return tmp;
                      }
                      
                      real(8) function code(x, y, z, t, a, b)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          real(8), intent (in) :: t
                          real(8), intent (in) :: a
                          real(8), intent (in) :: b
                          real(8) :: tmp
                          if (t <= (-7.5d+30)) then
                              tmp = t * b
                          else if (t <= 41000000000000.0d0) then
                              tmp = a + (x + z)
                          else
                              tmp = t * b
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double x, double y, double z, double t, double a, double b) {
                      	double tmp;
                      	if (t <= -7.5e+30) {
                      		tmp = t * b;
                      	} else if (t <= 41000000000000.0) {
                      		tmp = a + (x + z);
                      	} else {
                      		tmp = t * b;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a, b):
                      	tmp = 0
                      	if t <= -7.5e+30:
                      		tmp = t * b
                      	elif t <= 41000000000000.0:
                      		tmp = a + (x + z)
                      	else:
                      		tmp = t * b
                      	return tmp
                      
                      function code(x, y, z, t, a, b)
                      	tmp = 0.0
                      	if (t <= -7.5e+30)
                      		tmp = Float64(t * b);
                      	elseif (t <= 41000000000000.0)
                      		tmp = Float64(a + Float64(x + z));
                      	else
                      		tmp = Float64(t * b);
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z, t, a, b)
                      	tmp = 0.0;
                      	if (t <= -7.5e+30)
                      		tmp = t * b;
                      	elseif (t <= 41000000000000.0)
                      		tmp = a + (x + z);
                      	else
                      		tmp = t * b;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7.5e+30], N[(t * b), $MachinePrecision], If[LessEqual[t, 41000000000000.0], N[(a + N[(x + z), $MachinePrecision]), $MachinePrecision], N[(t * b), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;t \leq -7.5 \cdot 10^{+30}:\\
                      \;\;\;\;t \cdot b\\
                      
                      \mathbf{elif}\;t \leq 41000000000000:\\
                      \;\;\;\;a + \left(x + z\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t \cdot b\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if t < -7.49999999999999973e30 or 4.1e13 < t

                        1. Initial program 95.8%

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

                          \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                        4. Step-by-step derivation
                          1. lower-*.f64N/A

                            \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                          2. lower--.f6474.8

                            \[\leadsto t \cdot \color{blue}{\left(b - a\right)} \]
                        5. Applied rewrites74.8%

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

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

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

                          if -7.49999999999999973e30 < t < 4.1e13

                          1. Initial program 99.3%

                            \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                          2. Add Preprocessing
                          3. Step-by-step derivation
                            1. lift-*.f64N/A

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

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

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

                              \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - a \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(1\right)\right)\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                            5. distribute-rgt-inN/A

                              \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \color{blue}{\left(t \cdot a + \left(\mathsf{neg}\left(1\right)\right) \cdot a\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                            6. lower-fma.f64N/A

                              \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \color{blue}{\mathsf{fma}\left(t, a, \left(\mathsf{neg}\left(1\right)\right) \cdot a\right)}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                            7. lower-*.f64N/A

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

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

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

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

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

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

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

                              \[\leadsto a + \left(x + z\right) \]
                            3. Step-by-step derivation
                              1. Applied rewrites57.2%

                                \[\leadsto a + \left(z + x\right) \]
                            4. Recombined 2 regimes into one program.
                            5. Final simplification49.5%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{+30}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 41000000000000:\\ \;\;\;\;a + \left(x + z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
                            6. Add Preprocessing

                            Alternative 11: 35.9% accurate, 2.1× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{+29}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 41000000000000:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \end{array} \]
                            (FPCore (x y z t a b)
                             :precision binary64
                             (if (<= t -7.2e+29) (* t b) (if (<= t 41000000000000.0) (+ x a) (* t b))))
                            double code(double x, double y, double z, double t, double a, double b) {
                            	double tmp;
                            	if (t <= -7.2e+29) {
                            		tmp = t * b;
                            	} else if (t <= 41000000000000.0) {
                            		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 <= (-7.2d+29)) then
                                    tmp = t * b
                                else if (t <= 41000000000000.0d0) 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 <= -7.2e+29) {
                            		tmp = t * b;
                            	} else if (t <= 41000000000000.0) {
                            		tmp = x + a;
                            	} else {
                            		tmp = t * b;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a, b):
                            	tmp = 0
                            	if t <= -7.2e+29:
                            		tmp = t * b
                            	elif t <= 41000000000000.0:
                            		tmp = x + a
                            	else:
                            		tmp = t * b
                            	return tmp
                            
                            function code(x, y, z, t, a, b)
                            	tmp = 0.0
                            	if (t <= -7.2e+29)
                            		tmp = Float64(t * b);
                            	elseif (t <= 41000000000000.0)
                            		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 <= -7.2e+29)
                            		tmp = t * b;
                            	elseif (t <= 41000000000000.0)
                            		tmp = x + a;
                            	else
                            		tmp = t * b;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7.2e+29], N[(t * b), $MachinePrecision], If[LessEqual[t, 41000000000000.0], N[(x + a), $MachinePrecision], N[(t * b), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;t \leq -7.2 \cdot 10^{+29}:\\
                            \;\;\;\;t \cdot b\\
                            
                            \mathbf{elif}\;t \leq 41000000000000:\\
                            \;\;\;\;x + a\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t \cdot b\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if t < -7.19999999999999952e29 or 4.1e13 < t

                              1. Initial program 95.8%

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

                                \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                              4. Step-by-step derivation
                                1. lower-*.f64N/A

                                  \[\leadsto \color{blue}{t \cdot \left(b - a\right)} \]
                                2. lower--.f6474.8

                                  \[\leadsto t \cdot \color{blue}{\left(b - a\right)} \]
                              5. Applied rewrites74.8%

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

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

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

                                if -7.19999999999999952e29 < t < 4.1e13

                                1. Initial program 99.3%

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

                                  \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - a \cdot \left(t - 1\right)} \]
                                4. Step-by-step derivation
                                  1. sub-negN/A

                                    \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
                                  2. +-commutativeN/A

                                    \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                  3. distribute-rgt-neg-inN/A

                                    \[\leadsto \color{blue}{a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right)} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                  4. mul-1-negN/A

                                    \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                  5. lower-fma.f64N/A

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

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

                                    \[\leadsto \mathsf{fma}\left(a, -1 \cdot \left(t + \color{blue}{-1}\right), x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                  8. distribute-lft-inN/A

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

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

                                    \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 + -1 \cdot t}, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                  11. neg-mul-1N/A

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

                                    \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 - t}, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                  13. lower--.f64N/A

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

                                    \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
                                  15. lower-fma.f64N/A

                                    \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{\mathsf{fma}\left(b, \left(t + y\right) - 2, x\right)}\right) \]
                                  16. +-commutativeN/A

                                    \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, \color{blue}{\left(y + t\right)} - 2, x\right)\right) \]
                                  17. associate-+r-N/A

                                    \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, \color{blue}{y + \left(t - 2\right)}, x\right)\right) \]
                                  18. lower-+.f64N/A

                                    \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, \color{blue}{y + \left(t - 2\right)}, x\right)\right) \]
                                  19. sub-negN/A

                                    \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}, x\right)\right) \]
                                  20. lower-+.f64N/A

                                    \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}, x\right)\right) \]
                                  21. metadata-eval72.0

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

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

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

                                    \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 - t}, x\right) \]
                                  2. Taylor expanded in t around 0

                                    \[\leadsto a + x \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites44.7%

                                      \[\leadsto a + x \]
                                  4. Recombined 2 regimes into one program.
                                  5. Final simplification42.7%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{+29}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 41000000000000:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
                                  6. Add Preprocessing

                                  Alternative 12: 25.3% accurate, 9.3× speedup?

                                  \[\begin{array}{l} \\ x + a \end{array} \]
                                  (FPCore (x y z t a b) :precision binary64 (+ x a))
                                  double code(double x, double y, double z, double t, double a, double b) {
                                  	return x + 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 = x + a
                                  end function
                                  
                                  public static double code(double x, double y, double z, double t, double a, double b) {
                                  	return x + a;
                                  }
                                  
                                  def code(x, y, z, t, a, b):
                                  	return x + a
                                  
                                  function code(x, y, z, t, a, b)
                                  	return Float64(x + a)
                                  end
                                  
                                  function tmp = code(x, y, z, t, a, b)
                                  	tmp = x + a;
                                  end
                                  
                                  code[x_, y_, z_, t_, a_, b_] := N[(x + a), $MachinePrecision]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  x + a
                                  \end{array}
                                  
                                  Derivation
                                  1. Initial program 97.6%

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

                                    \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - a \cdot \left(t - 1\right)} \]
                                  4. Step-by-step derivation
                                    1. sub-negN/A

                                      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + \left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right)} \]
                                    2. +-commutativeN/A

                                      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(t - 1\right)\right)\right) + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right)} \]
                                    3. distribute-rgt-neg-inN/A

                                      \[\leadsto \color{blue}{a \cdot \left(\mathsf{neg}\left(\left(t - 1\right)\right)\right)} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                    4. mul-1-negN/A

                                      \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t - 1\right)\right)} + \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                    5. lower-fma.f64N/A

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

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

                                      \[\leadsto \mathsf{fma}\left(a, -1 \cdot \left(t + \color{blue}{-1}\right), x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                    8. distribute-lft-inN/A

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

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

                                      \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 + -1 \cdot t}, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                    11. neg-mul-1N/A

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

                                      \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 - t}, x + b \cdot \left(\left(t + y\right) - 2\right)\right) \]
                                    13. lower--.f64N/A

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

                                      \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{b \cdot \left(\left(t + y\right) - 2\right) + x}\right) \]
                                    15. lower-fma.f64N/A

                                      \[\leadsto \mathsf{fma}\left(a, 1 - t, \color{blue}{\mathsf{fma}\left(b, \left(t + y\right) - 2, x\right)}\right) \]
                                    16. +-commutativeN/A

                                      \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, \color{blue}{\left(y + t\right)} - 2, x\right)\right) \]
                                    17. associate-+r-N/A

                                      \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, \color{blue}{y + \left(t - 2\right)}, x\right)\right) \]
                                    18. lower-+.f64N/A

                                      \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, \color{blue}{y + \left(t - 2\right)}, x\right)\right) \]
                                    19. sub-negN/A

                                      \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}, x\right)\right) \]
                                    20. lower-+.f64N/A

                                      \[\leadsto \mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, y + \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right)\right)}, x\right)\right) \]
                                    21. metadata-eval79.0

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

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

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

                                      \[\leadsto \mathsf{fma}\left(a, \color{blue}{1 - t}, x\right) \]
                                    2. Taylor expanded in t around 0

                                      \[\leadsto a + x \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites27.7%

                                        \[\leadsto a + x \]
                                      2. Final simplification27.7%

                                        \[\leadsto x + a \]
                                      3. Add Preprocessing

                                      Reproduce

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