Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1

Percentage Accurate: 92.0% → 95.8%
Time: 11.5s
Alternatives: 15
Speedup: 0.4×

Specification

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

\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\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 15 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: 92.0% accurate, 1.0× speedup?

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

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

Alternative 1: 95.8% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(z \cdot a\right) \cdot b\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+306}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 100.0%

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

    if 4.99999999999999993e306 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b))

    1. Initial program 74.5%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 90.7%

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

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

Alternative 2: 38.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(z \cdot b\right)\\ \mathbf{if}\;a \leq -4.2 \cdot 10^{+48}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-99}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-140}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-308}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-22}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.35 \cdot 10^{+21}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+44}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+175}:\\ \;\;\;\;t \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (* z b))))
   (if (<= a -4.2e+48)
     t_1
     (if (<= a -1.1e-99)
       (* y z)
       (if (<= a -2.7e-140)
         x
         (if (<= a 3.8e-308)
           (* y z)
           (if (<= a 2.8e-22)
             x
             (if (<= a 2.35e+21)
               t_1
               (if (<= a 3.6e+44) x (if (<= a 3.5e+175) (* t a) t_1))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (z * b);
	double tmp;
	if (a <= -4.2e+48) {
		tmp = t_1;
	} else if (a <= -1.1e-99) {
		tmp = y * z;
	} else if (a <= -2.7e-140) {
		tmp = x;
	} else if (a <= 3.8e-308) {
		tmp = y * z;
	} else if (a <= 2.8e-22) {
		tmp = x;
	} else if (a <= 2.35e+21) {
		tmp = t_1;
	} else if (a <= 3.6e+44) {
		tmp = x;
	} else if (a <= 3.5e+175) {
		tmp = t * a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = a * (z * b)
    if (a <= (-4.2d+48)) then
        tmp = t_1
    else if (a <= (-1.1d-99)) then
        tmp = y * z
    else if (a <= (-2.7d-140)) then
        tmp = x
    else if (a <= 3.8d-308) then
        tmp = y * z
    else if (a <= 2.8d-22) then
        tmp = x
    else if (a <= 2.35d+21) then
        tmp = t_1
    else if (a <= 3.6d+44) then
        tmp = x
    else if (a <= 3.5d+175) then
        tmp = t * a
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (z * b);
	double tmp;
	if (a <= -4.2e+48) {
		tmp = t_1;
	} else if (a <= -1.1e-99) {
		tmp = y * z;
	} else if (a <= -2.7e-140) {
		tmp = x;
	} else if (a <= 3.8e-308) {
		tmp = y * z;
	} else if (a <= 2.8e-22) {
		tmp = x;
	} else if (a <= 2.35e+21) {
		tmp = t_1;
	} else if (a <= 3.6e+44) {
		tmp = x;
	} else if (a <= 3.5e+175) {
		tmp = t * a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (z * b)
	tmp = 0
	if a <= -4.2e+48:
		tmp = t_1
	elif a <= -1.1e-99:
		tmp = y * z
	elif a <= -2.7e-140:
		tmp = x
	elif a <= 3.8e-308:
		tmp = y * z
	elif a <= 2.8e-22:
		tmp = x
	elif a <= 2.35e+21:
		tmp = t_1
	elif a <= 3.6e+44:
		tmp = x
	elif a <= 3.5e+175:
		tmp = t * a
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(z * b))
	tmp = 0.0
	if (a <= -4.2e+48)
		tmp = t_1;
	elseif (a <= -1.1e-99)
		tmp = Float64(y * z);
	elseif (a <= -2.7e-140)
		tmp = x;
	elseif (a <= 3.8e-308)
		tmp = Float64(y * z);
	elseif (a <= 2.8e-22)
		tmp = x;
	elseif (a <= 2.35e+21)
		tmp = t_1;
	elseif (a <= 3.6e+44)
		tmp = x;
	elseif (a <= 3.5e+175)
		tmp = Float64(t * a);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (z * b);
	tmp = 0.0;
	if (a <= -4.2e+48)
		tmp = t_1;
	elseif (a <= -1.1e-99)
		tmp = y * z;
	elseif (a <= -2.7e-140)
		tmp = x;
	elseif (a <= 3.8e-308)
		tmp = y * z;
	elseif (a <= 2.8e-22)
		tmp = x;
	elseif (a <= 2.35e+21)
		tmp = t_1;
	elseif (a <= 3.6e+44)
		tmp = x;
	elseif (a <= 3.5e+175)
		tmp = t * a;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.2e+48], t$95$1, If[LessEqual[a, -1.1e-99], N[(y * z), $MachinePrecision], If[LessEqual[a, -2.7e-140], x, If[LessEqual[a, 3.8e-308], N[(y * z), $MachinePrecision], If[LessEqual[a, 2.8e-22], x, If[LessEqual[a, 2.35e+21], t$95$1, If[LessEqual[a, 3.6e+44], x, If[LessEqual[a, 3.5e+175], N[(t * a), $MachinePrecision], t$95$1]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.1 \cdot 10^{-99}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;a \leq -2.7 \cdot 10^{-140}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 3.8 \cdot 10^{-308}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;a \leq 2.8 \cdot 10^{-22}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 2.35 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 3.5 \cdot 10^{+175}:\\
\;\;\;\;t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.1999999999999997e48 or 2.79999999999999995e-22 < a < 2.35e21 or 3.5000000000000003e175 < a

    1. Initial program 88.8%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 96.5%

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

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

    if -4.1999999999999997e48 < a < -1.10000000000000002e-99 or -2.7e-140 < a < 3.79999999999999975e-308

    1. Initial program 100.0%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 51.4%

      \[\leadsto \color{blue}{y \cdot z} \]
    6. Step-by-step derivation
      1. *-commutative51.4%

        \[\leadsto \color{blue}{z \cdot y} \]
    7. Simplified51.4%

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

    if -1.10000000000000002e-99 < a < -2.7e-140 or 3.79999999999999975e-308 < a < 2.79999999999999995e-22 or 2.35e21 < a < 3.6e44

    1. Initial program 98.7%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 55.1%

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

    if 3.6e44 < a < 3.5000000000000003e175

    1. Initial program 88.9%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 53.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.2 \cdot 10^{+48}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-99}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-140}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-308}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-22}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.35 \cdot 10^{+21}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+44}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+175}:\\ \;\;\;\;t \cdot a\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 38.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot a\right) \cdot b\\ \mathbf{if}\;a \leq -1.1 \cdot 10^{+44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.42 \cdot 10^{-101}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq -4.9 \cdot 10^{-138}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-308}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-21}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 5 \cdot 10^{+22}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+44}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 5 \cdot 10^{+175}:\\ \;\;\;\;t \cdot a\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (* z a) b)))
   (if (<= a -1.1e+44)
     t_1
     (if (<= a -1.42e-101)
       (* y z)
       (if (<= a -4.9e-138)
         x
         (if (<= a 3.6e-308)
           (* y z)
           (if (<= a 1.7e-21)
             x
             (if (<= a 5e+22)
               t_1
               (if (<= a 2.7e+44)
                 x
                 (if (<= a 5e+175) (* t a) (* a (* z b))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z * a) * b;
	double tmp;
	if (a <= -1.1e+44) {
		tmp = t_1;
	} else if (a <= -1.42e-101) {
		tmp = y * z;
	} else if (a <= -4.9e-138) {
		tmp = x;
	} else if (a <= 3.6e-308) {
		tmp = y * z;
	} else if (a <= 1.7e-21) {
		tmp = x;
	} else if (a <= 5e+22) {
		tmp = t_1;
	} else if (a <= 2.7e+44) {
		tmp = x;
	} else if (a <= 5e+175) {
		tmp = t * a;
	} else {
		tmp = a * (z * b);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z * a) * b
    if (a <= (-1.1d+44)) then
        tmp = t_1
    else if (a <= (-1.42d-101)) then
        tmp = y * z
    else if (a <= (-4.9d-138)) then
        tmp = x
    else if (a <= 3.6d-308) then
        tmp = y * z
    else if (a <= 1.7d-21) then
        tmp = x
    else if (a <= 5d+22) then
        tmp = t_1
    else if (a <= 2.7d+44) then
        tmp = x
    else if (a <= 5d+175) then
        tmp = t * a
    else
        tmp = a * (z * b)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z * a) * b;
	double tmp;
	if (a <= -1.1e+44) {
		tmp = t_1;
	} else if (a <= -1.42e-101) {
		tmp = y * z;
	} else if (a <= -4.9e-138) {
		tmp = x;
	} else if (a <= 3.6e-308) {
		tmp = y * z;
	} else if (a <= 1.7e-21) {
		tmp = x;
	} else if (a <= 5e+22) {
		tmp = t_1;
	} else if (a <= 2.7e+44) {
		tmp = x;
	} else if (a <= 5e+175) {
		tmp = t * a;
	} else {
		tmp = a * (z * b);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z * a) * b
	tmp = 0
	if a <= -1.1e+44:
		tmp = t_1
	elif a <= -1.42e-101:
		tmp = y * z
	elif a <= -4.9e-138:
		tmp = x
	elif a <= 3.6e-308:
		tmp = y * z
	elif a <= 1.7e-21:
		tmp = x
	elif a <= 5e+22:
		tmp = t_1
	elif a <= 2.7e+44:
		tmp = x
	elif a <= 5e+175:
		tmp = t * a
	else:
		tmp = a * (z * b)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z * a) * b)
	tmp = 0.0
	if (a <= -1.1e+44)
		tmp = t_1;
	elseif (a <= -1.42e-101)
		tmp = Float64(y * z);
	elseif (a <= -4.9e-138)
		tmp = x;
	elseif (a <= 3.6e-308)
		tmp = Float64(y * z);
	elseif (a <= 1.7e-21)
		tmp = x;
	elseif (a <= 5e+22)
		tmp = t_1;
	elseif (a <= 2.7e+44)
		tmp = x;
	elseif (a <= 5e+175)
		tmp = Float64(t * a);
	else
		tmp = Float64(a * Float64(z * b));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z * a) * b;
	tmp = 0.0;
	if (a <= -1.1e+44)
		tmp = t_1;
	elseif (a <= -1.42e-101)
		tmp = y * z;
	elseif (a <= -4.9e-138)
		tmp = x;
	elseif (a <= 3.6e-308)
		tmp = y * z;
	elseif (a <= 1.7e-21)
		tmp = x;
	elseif (a <= 5e+22)
		tmp = t_1;
	elseif (a <= 2.7e+44)
		tmp = x;
	elseif (a <= 5e+175)
		tmp = t * a;
	else
		tmp = a * (z * b);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[a, -1.1e+44], t$95$1, If[LessEqual[a, -1.42e-101], N[(y * z), $MachinePrecision], If[LessEqual[a, -4.9e-138], x, If[LessEqual[a, 3.6e-308], N[(y * z), $MachinePrecision], If[LessEqual[a, 1.7e-21], x, If[LessEqual[a, 5e+22], t$95$1, If[LessEqual[a, 2.7e+44], x, If[LessEqual[a, 5e+175], N[(t * a), $MachinePrecision], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.42 \cdot 10^{-101}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;a \leq -4.9 \cdot 10^{-138}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 3.6 \cdot 10^{-308}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;a \leq 1.7 \cdot 10^{-21}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 5 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 2.7 \cdot 10^{+44}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 5 \cdot 10^{+175}:\\
\;\;\;\;t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.09999999999999998e44 or 1.7e-21 < a < 4.9999999999999996e22

    1. Initial program 89.3%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 96.9%

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

      \[\leadsto \color{blue}{a \cdot \left(b \cdot z\right)} \]
    7. Step-by-step derivation
      1. pow155.7%

        \[\leadsto \color{blue}{{\left(a \cdot \left(b \cdot z\right)\right)}^{1}} \]
    8. Applied egg-rr55.7%

      \[\leadsto \color{blue}{{\left(a \cdot \left(b \cdot z\right)\right)}^{1}} \]
    9. Step-by-step derivation
      1. unpow155.7%

        \[\leadsto \color{blue}{a \cdot \left(b \cdot z\right)} \]
      2. *-commutative55.7%

        \[\leadsto \color{blue}{\left(b \cdot z\right) \cdot a} \]
      3. associate-*l*57.3%

        \[\leadsto \color{blue}{b \cdot \left(z \cdot a\right)} \]
    10. Simplified57.3%

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

    if -1.09999999999999998e44 < a < -1.4200000000000001e-101 or -4.90000000000000016e-138 < a < 3.5999999999999999e-308

    1. Initial program 100.0%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 51.4%

      \[\leadsto \color{blue}{y \cdot z} \]
    6. Step-by-step derivation
      1. *-commutative51.4%

        \[\leadsto \color{blue}{z \cdot y} \]
    7. Simplified51.4%

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

    if -1.4200000000000001e-101 < a < -4.90000000000000016e-138 or 3.5999999999999999e-308 < a < 1.7e-21 or 4.9999999999999996e22 < a < 2.7e44

    1. Initial program 98.7%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 55.1%

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

    if 2.7e44 < a < 5e175

    1. Initial program 88.9%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 53.0%

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

    if 5e175 < a

    1. Initial program 87.3%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 95.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{+44}:\\ \;\;\;\;\left(z \cdot a\right) \cdot b\\ \mathbf{elif}\;a \leq -1.42 \cdot 10^{-101}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq -4.9 \cdot 10^{-138}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-308}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-21}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 5 \cdot 10^{+22}:\\ \;\;\;\;\left(z \cdot a\right) \cdot b\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+44}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 5 \cdot 10^{+175}:\\ \;\;\;\;t \cdot a\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 38.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot a\right) \cdot b\\ \mathbf{if}\;a \leq -4.4 \cdot 10^{+54}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-102}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-139}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-308}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-21}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+20}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+45}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{+178}:\\ \;\;\;\;t \cdot a\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(a \cdot b\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (* z a) b)))
   (if (<= a -4.4e+54)
     t_1
     (if (<= a -4.5e-102)
       (* y z)
       (if (<= a -3.8e-139)
         x
         (if (<= a -1.9e-308)
           (* y z)
           (if (<= a 1.55e-21)
             x
             (if (<= a 1.4e+20)
               t_1
               (if (<= a 4e+45)
                 x
                 (if (<= a 3.8e+178) (* t a) (* z (* a b))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z * a) * b;
	double tmp;
	if (a <= -4.4e+54) {
		tmp = t_1;
	} else if (a <= -4.5e-102) {
		tmp = y * z;
	} else if (a <= -3.8e-139) {
		tmp = x;
	} else if (a <= -1.9e-308) {
		tmp = y * z;
	} else if (a <= 1.55e-21) {
		tmp = x;
	} else if (a <= 1.4e+20) {
		tmp = t_1;
	} else if (a <= 4e+45) {
		tmp = x;
	} else if (a <= 3.8e+178) {
		tmp = t * a;
	} else {
		tmp = z * (a * b);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z * a) * b
    if (a <= (-4.4d+54)) then
        tmp = t_1
    else if (a <= (-4.5d-102)) then
        tmp = y * z
    else if (a <= (-3.8d-139)) then
        tmp = x
    else if (a <= (-1.9d-308)) then
        tmp = y * z
    else if (a <= 1.55d-21) then
        tmp = x
    else if (a <= 1.4d+20) then
        tmp = t_1
    else if (a <= 4d+45) then
        tmp = x
    else if (a <= 3.8d+178) then
        tmp = t * a
    else
        tmp = z * (a * b)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z * a) * b;
	double tmp;
	if (a <= -4.4e+54) {
		tmp = t_1;
	} else if (a <= -4.5e-102) {
		tmp = y * z;
	} else if (a <= -3.8e-139) {
		tmp = x;
	} else if (a <= -1.9e-308) {
		tmp = y * z;
	} else if (a <= 1.55e-21) {
		tmp = x;
	} else if (a <= 1.4e+20) {
		tmp = t_1;
	} else if (a <= 4e+45) {
		tmp = x;
	} else if (a <= 3.8e+178) {
		tmp = t * a;
	} else {
		tmp = z * (a * b);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z * a) * b
	tmp = 0
	if a <= -4.4e+54:
		tmp = t_1
	elif a <= -4.5e-102:
		tmp = y * z
	elif a <= -3.8e-139:
		tmp = x
	elif a <= -1.9e-308:
		tmp = y * z
	elif a <= 1.55e-21:
		tmp = x
	elif a <= 1.4e+20:
		tmp = t_1
	elif a <= 4e+45:
		tmp = x
	elif a <= 3.8e+178:
		tmp = t * a
	else:
		tmp = z * (a * b)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z * a) * b)
	tmp = 0.0
	if (a <= -4.4e+54)
		tmp = t_1;
	elseif (a <= -4.5e-102)
		tmp = Float64(y * z);
	elseif (a <= -3.8e-139)
		tmp = x;
	elseif (a <= -1.9e-308)
		tmp = Float64(y * z);
	elseif (a <= 1.55e-21)
		tmp = x;
	elseif (a <= 1.4e+20)
		tmp = t_1;
	elseif (a <= 4e+45)
		tmp = x;
	elseif (a <= 3.8e+178)
		tmp = Float64(t * a);
	else
		tmp = Float64(z * Float64(a * b));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z * a) * b;
	tmp = 0.0;
	if (a <= -4.4e+54)
		tmp = t_1;
	elseif (a <= -4.5e-102)
		tmp = y * z;
	elseif (a <= -3.8e-139)
		tmp = x;
	elseif (a <= -1.9e-308)
		tmp = y * z;
	elseif (a <= 1.55e-21)
		tmp = x;
	elseif (a <= 1.4e+20)
		tmp = t_1;
	elseif (a <= 4e+45)
		tmp = x;
	elseif (a <= 3.8e+178)
		tmp = t * a;
	else
		tmp = z * (a * b);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[a, -4.4e+54], t$95$1, If[LessEqual[a, -4.5e-102], N[(y * z), $MachinePrecision], If[LessEqual[a, -3.8e-139], x, If[LessEqual[a, -1.9e-308], N[(y * z), $MachinePrecision], If[LessEqual[a, 1.55e-21], x, If[LessEqual[a, 1.4e+20], t$95$1, If[LessEqual[a, 4e+45], x, If[LessEqual[a, 3.8e+178], N[(t * a), $MachinePrecision], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -4.5 \cdot 10^{-102}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;a \leq -3.8 \cdot 10^{-139}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.9 \cdot 10^{-308}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;a \leq 1.55 \cdot 10^{-21}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.4 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 4 \cdot 10^{+45}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 3.8 \cdot 10^{+178}:\\
\;\;\;\;t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -4.3999999999999998e54 or 1.5499999999999999e-21 < a < 1.4e20

    1. Initial program 89.3%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 96.9%

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

      \[\leadsto \color{blue}{a \cdot \left(b \cdot z\right)} \]
    7. Step-by-step derivation
      1. pow155.7%

        \[\leadsto \color{blue}{{\left(a \cdot \left(b \cdot z\right)\right)}^{1}} \]
    8. Applied egg-rr55.7%

      \[\leadsto \color{blue}{{\left(a \cdot \left(b \cdot z\right)\right)}^{1}} \]
    9. Step-by-step derivation
      1. unpow155.7%

        \[\leadsto \color{blue}{a \cdot \left(b \cdot z\right)} \]
      2. *-commutative55.7%

        \[\leadsto \color{blue}{\left(b \cdot z\right) \cdot a} \]
      3. associate-*l*57.3%

        \[\leadsto \color{blue}{b \cdot \left(z \cdot a\right)} \]
    10. Simplified57.3%

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

    if -4.3999999999999998e54 < a < -4.49999999999999999e-102 or -3.80000000000000008e-139 < a < -1.9000000000000001e-308

    1. Initial program 100.0%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 51.4%

      \[\leadsto \color{blue}{y \cdot z} \]
    6. Step-by-step derivation
      1. *-commutative51.4%

        \[\leadsto \color{blue}{z \cdot y} \]
    7. Simplified51.4%

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

    if -4.49999999999999999e-102 < a < -3.80000000000000008e-139 or -1.9000000000000001e-308 < a < 1.5499999999999999e-21 or 1.4e20 < a < 3.9999999999999997e45

    1. Initial program 98.7%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 55.1%

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

    if 3.9999999999999997e45 < a < 3.79999999999999998e178

    1. Initial program 88.9%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 53.0%

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

    if 3.79999999999999998e178 < a

    1. Initial program 87.3%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 95.5%

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

      \[\leadsto \color{blue}{a \cdot \left(b \cdot z\right)} \]
    7. Step-by-step derivation
      1. associate-*r*87.6%

        \[\leadsto \color{blue}{\left(a \cdot b\right) \cdot z} \]
    8. Simplified87.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.4 \cdot 10^{+54}:\\ \;\;\;\;\left(z \cdot a\right) \cdot b\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-102}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-139}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-308}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-21}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+20}:\\ \;\;\;\;\left(z \cdot a\right) \cdot b\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+45}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{+178}:\\ \;\;\;\;t \cdot a\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 96.5% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 98.4%

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

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

    1. Initial program 0.0%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 80.0%

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

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

Alternative 6: 39.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{-42}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 4.3 \cdot 10^{-247}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;x \leq 20000000000:\\
\;\;\;\;t \cdot a\\

\mathbf{elif}\;x \leq 5.5 \cdot 10^{+63}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;x \leq 6.8 \cdot 10^{+72}:\\
\;\;\;\;t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -6.80000000000000045e-42 or 6.7999999999999997e72 < x

    1. Initial program 93.1%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 49.5%

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

    if -6.80000000000000045e-42 < x < 4.30000000000000005e-247 or 2e10 < x < 5.50000000000000004e63

    1. Initial program 95.8%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 47.3%

      \[\leadsto \color{blue}{y \cdot z} \]
    6. Step-by-step derivation
      1. *-commutative47.3%

        \[\leadsto \color{blue}{z \cdot y} \]
    7. Simplified47.3%

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

    if 4.30000000000000005e-247 < x < 2e10 or 5.50000000000000004e63 < x < 6.7999999999999997e72

    1. Initial program 96.4%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 45.7%

      \[\leadsto \color{blue}{a \cdot t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification48.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.8 \cdot 10^{-42}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 4.3 \cdot 10^{-247}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;x \leq 20000000000:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{+63}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;x \leq 6.8 \cdot 10^{+72}:\\ \;\;\;\;t \cdot a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 73.9% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq 1.18 \cdot 10^{-94}:\\
\;\;\;\;x + y \cdot z\\

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

\mathbf{elif}\;a \leq 23500000000000:\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -8.0000000000000002e-13 or 2.35e13 < a

    1. Initial program 89.6%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 78.8%

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

    if -8.0000000000000002e-13 < a < 1.18e-94

    1. Initial program 99.0%

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

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

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

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

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

    if 1.18e-94 < a < 9.99999999999999908e-22

    1. Initial program 99.8%

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot t + x} \]
    7. Simplified83.6%

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

    if 9.99999999999999908e-22 < a < 2.35e13

    1. Initial program 100.0%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 86.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8 \cdot 10^{-13}:\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \mathbf{elif}\;a \leq 1.18 \cdot 10^{-94}:\\ \;\;\;\;x + y \cdot z\\ \mathbf{elif}\;a \leq 10^{-21}:\\ \;\;\;\;x + t \cdot a\\ \mathbf{elif}\;a \leq 23500000000000:\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 57.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.7 \cdot 10^{+115}:\\ \;\;\;\;\left(z \cdot a\right) \cdot b\\ \mathbf{elif}\;a \leq 2 \cdot 10^{+121}:\\ \;\;\;\;x + y \cdot z\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+177}:\\ \;\;\;\;t \cdot a\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(a \cdot b\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -2.7e+115)
   (* (* z a) b)
   (if (<= a 2e+121)
     (+ x (* y z))
     (if (<= a 1.4e+177) (* t a) (* z (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -2.7e+115) {
		tmp = (z * a) * b;
	} else if (a <= 2e+121) {
		tmp = x + (y * z);
	} else if (a <= 1.4e+177) {
		tmp = t * a;
	} else {
		tmp = z * (a * 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 (a <= (-2.7d+115)) then
        tmp = (z * a) * b
    else if (a <= 2d+121) then
        tmp = x + (y * z)
    else if (a <= 1.4d+177) then
        tmp = t * a
    else
        tmp = z * (a * 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 (a <= -2.7e+115) {
		tmp = (z * a) * b;
	} else if (a <= 2e+121) {
		tmp = x + (y * z);
	} else if (a <= 1.4e+177) {
		tmp = t * a;
	} else {
		tmp = z * (a * b);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -2.7e+115:
		tmp = (z * a) * b
	elif a <= 2e+121:
		tmp = x + (y * z)
	elif a <= 1.4e+177:
		tmp = t * a
	else:
		tmp = z * (a * b)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -2.7e+115)
		tmp = Float64(Float64(z * a) * b);
	elseif (a <= 2e+121)
		tmp = Float64(x + Float64(y * z));
	elseif (a <= 1.4e+177)
		tmp = Float64(t * a);
	else
		tmp = Float64(z * Float64(a * b));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (a <= -2.7e+115)
		tmp = (z * a) * b;
	elseif (a <= 2e+121)
		tmp = x + (y * z);
	elseif (a <= 1.4e+177)
		tmp = t * a;
	else
		tmp = z * (a * b);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2.7e+115], N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[a, 2e+121], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.4e+177], N[(t * a), $MachinePrecision], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.7 \cdot 10^{+115}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\

\mathbf{elif}\;a \leq 2 \cdot 10^{+121}:\\
\;\;\;\;x + y \cdot z\\

\mathbf{elif}\;a \leq 1.4 \cdot 10^{+177}:\\
\;\;\;\;t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.70000000000000004e115

    1. Initial program 84.1%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 95.3%

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

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

        \[\leadsto \color{blue}{{\left(a \cdot \left(b \cdot z\right)\right)}^{1}} \]
    8. Applied egg-rr58.4%

      \[\leadsto \color{blue}{{\left(a \cdot \left(b \cdot z\right)\right)}^{1}} \]
    9. Step-by-step derivation
      1. unpow158.4%

        \[\leadsto \color{blue}{a \cdot \left(b \cdot z\right)} \]
      2. *-commutative58.4%

        \[\leadsto \color{blue}{\left(b \cdot z\right) \cdot a} \]
      3. associate-*l*60.7%

        \[\leadsto \color{blue}{b \cdot \left(z \cdot a\right)} \]
    10. Simplified60.7%

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

    if -2.70000000000000004e115 < a < 2.00000000000000007e121

    1. Initial program 98.3%

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

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

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

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

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

    if 2.00000000000000007e121 < a < 1.40000000000000001e177

    1. Initial program 90.9%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 73.7%

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

    if 1.40000000000000001e177 < a

    1. Initial program 87.3%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 95.5%

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

      \[\leadsto \color{blue}{a \cdot \left(b \cdot z\right)} \]
    7. Step-by-step derivation
      1. associate-*r*87.6%

        \[\leadsto \color{blue}{\left(a \cdot b\right) \cdot z} \]
    8. Simplified87.6%

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

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

Alternative 9: 58.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.9 \cdot 10^{+118}:\\ \;\;\;\;\left(z \cdot a\right) \cdot b\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-95}:\\ \;\;\;\;x + y \cdot z\\ \mathbf{elif}\;a \leq 4.1 \cdot 10^{+178}:\\ \;\;\;\;x + t \cdot a\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(a \cdot b\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -3.9e+118)
   (* (* z a) b)
   (if (<= a 5.2e-95)
     (+ x (* y z))
     (if (<= a 4.1e+178) (+ x (* t a)) (* z (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -3.9e+118) {
		tmp = (z * a) * b;
	} else if (a <= 5.2e-95) {
		tmp = x + (y * z);
	} else if (a <= 4.1e+178) {
		tmp = x + (t * a);
	} else {
		tmp = z * (a * 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 (a <= (-3.9d+118)) then
        tmp = (z * a) * b
    else if (a <= 5.2d-95) then
        tmp = x + (y * z)
    else if (a <= 4.1d+178) then
        tmp = x + (t * a)
    else
        tmp = z * (a * 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 (a <= -3.9e+118) {
		tmp = (z * a) * b;
	} else if (a <= 5.2e-95) {
		tmp = x + (y * z);
	} else if (a <= 4.1e+178) {
		tmp = x + (t * a);
	} else {
		tmp = z * (a * b);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -3.9e+118:
		tmp = (z * a) * b
	elif a <= 5.2e-95:
		tmp = x + (y * z)
	elif a <= 4.1e+178:
		tmp = x + (t * a)
	else:
		tmp = z * (a * b)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -3.9e+118)
		tmp = Float64(Float64(z * a) * b);
	elseif (a <= 5.2e-95)
		tmp = Float64(x + Float64(y * z));
	elseif (a <= 4.1e+178)
		tmp = Float64(x + Float64(t * a));
	else
		tmp = Float64(z * Float64(a * b));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (a <= -3.9e+118)
		tmp = (z * a) * b;
	elseif (a <= 5.2e-95)
		tmp = x + (y * z);
	elseif (a <= 4.1e+178)
		tmp = x + (t * a);
	else
		tmp = z * (a * b);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -3.9e+118], N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[a, 5.2e-95], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.1e+178], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.9 \cdot 10^{+118}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\

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

\mathbf{elif}\;a \leq 4.1 \cdot 10^{+178}:\\
\;\;\;\;x + t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.9e118

    1. Initial program 84.1%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 95.3%

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

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

        \[\leadsto \color{blue}{{\left(a \cdot \left(b \cdot z\right)\right)}^{1}} \]
    8. Applied egg-rr58.4%

      \[\leadsto \color{blue}{{\left(a \cdot \left(b \cdot z\right)\right)}^{1}} \]
    9. Step-by-step derivation
      1. unpow158.4%

        \[\leadsto \color{blue}{a \cdot \left(b \cdot z\right)} \]
      2. *-commutative58.4%

        \[\leadsto \color{blue}{\left(b \cdot z\right) \cdot a} \]
      3. associate-*l*60.7%

        \[\leadsto \color{blue}{b \cdot \left(z \cdot a\right)} \]
    10. Simplified60.7%

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

    if -3.9e118 < a < 5.20000000000000001e-95

    1. Initial program 99.2%

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

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

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

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

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

    if 5.20000000000000001e-95 < a < 4.09999999999999996e178

    1. Initial program 95.0%

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot t + x} \]
    7. Simplified69.7%

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

    if 4.09999999999999996e178 < a

    1. Initial program 87.3%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 95.5%

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

      \[\leadsto \color{blue}{a \cdot \left(b \cdot z\right)} \]
    7. Step-by-step derivation
      1. associate-*r*87.6%

        \[\leadsto \color{blue}{\left(a \cdot b\right) \cdot z} \]
    8. Simplified87.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.9 \cdot 10^{+118}:\\ \;\;\;\;\left(z \cdot a\right) \cdot b\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-95}:\\ \;\;\;\;x + y \cdot z\\ \mathbf{elif}\;a \leq 4.1 \cdot 10^{+178}:\\ \;\;\;\;x + t \cdot a\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 82.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.8 \cdot 10^{+111} \lor \neg \left(a \leq 2.05 \cdot 10^{+118}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.7999999999999999e111 or 2.0499999999999999e118 < a

    1. Initial program 85.3%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 91.4%

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

    if -5.7999999999999999e111 < a < 2.0499999999999999e118

    1. Initial program 98.8%

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

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

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

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

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

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

Alternative 11: 85.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{+106} \lor \neg \left(t \leq 2.1 \cdot 10^{+81}\right):\\
\;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.8999999999999999e106 or 2.0999999999999999e81 < t

    1. Initial program 94.0%

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

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

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

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

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

    if -1.8999999999999999e106 < t < 2.0999999999999999e81

    1. Initial program 95.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(y \cdot z + a \cdot \left(b \cdot z\right)\right)} + x \]
      3. associate-*r*91.9%

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

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

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

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

Alternative 12: 74.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.2 \cdot 10^{-14} \lor \neg \left(a \leq 2.9 \cdot 10^{-52}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.20000000000000009e-14 or 2.9000000000000002e-52 < a

    1. Initial program 90.7%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 77.5%

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

    if -6.20000000000000009e-14 < a < 2.9000000000000002e-52

    1. Initial program 99.1%

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

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

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

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

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

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

Alternative 13: 91.9% accurate, 1.0× speedup?

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

\\
\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)
\end{array}
Derivation
  1. Initial program 94.6%

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

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

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

    \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
  4. Add Preprocessing
  5. Final simplification94.6%

    \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right) \]
  6. Add Preprocessing

Alternative 14: 39.9% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.3 \cdot 10^{-9}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 7 \cdot 10^{+73}:\\
\;\;\;\;t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.30000000000000018e-9 or 7.00000000000000004e73 < x

    1. Initial program 93.6%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 51.0%

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

    if -3.30000000000000018e-9 < x < 7.00000000000000004e73

    1. Initial program 95.5%

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

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 34.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.3 \cdot 10^{-9}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 7 \cdot 10^{+73}:\\ \;\;\;\;t \cdot a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 26.4% accurate, 15.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in x around inf 28.7%

    \[\leadsto \color{blue}{x} \]
  6. Final simplification28.7%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 97.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z < 4.7589743188364287 \cdot 10^{-122}:\\
\;\;\;\;\left(b \cdot z + t\right) \cdot a + \left(z \cdot y + x\right)\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024060 
(FPCore (x y z t a b)
  :name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
  :precision binary64

  :alt
  (if (< z -11820553527347888000.0) (+ (* z (+ (* b a) y)) (+ x (* t a))) (if (< z 4.7589743188364287e-122) (+ (* (+ (* b z) t) a) (+ (* z y) x)) (+ (* z (+ (* b a) y)) (+ x (* t a)))))

  (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))