Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1

Percentage Accurate: 92.3% → 97.5%
Time: 11.6s
Alternatives: 15
Speedup: 0.7×

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.3% 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: 97.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 10^{+291}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 + a \cdot \frac{t + z \cdot \left(b + \frac{y}{a}\right)}{x}\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 1e+291)
     t_1
     (* x (+ 1.0 (* a (/ (+ t (* z (+ b (/ y a)))) x)))))))
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 <= 1e+291) {
		tmp = t_1;
	} else {
		tmp = x * (1.0 + (a * ((t + (z * (b + (y / a)))) / 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) :: t_1
    real(8) :: tmp
    t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b)
    if (t_1 <= 1d+291) then
        tmp = t_1
    else
        tmp = x * (1.0d0 + (a * ((t + (z * (b + (y / a)))) / x)))
    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 <= 1e+291) {
		tmp = t_1;
	} else {
		tmp = x * (1.0 + (a * ((t + (z * (b + (y / a)))) / x)));
	}
	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 <= 1e+291:
		tmp = t_1
	else:
		tmp = x * (1.0 + (a * ((t + (z * (b + (y / a)))) / x)))
	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 <= 1e+291)
		tmp = t_1;
	else
		tmp = Float64(x * Float64(1.0 + Float64(a * Float64(Float64(t + Float64(z * Float64(b + Float64(y / a)))) / x))));
	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 <= 1e+291)
		tmp = t_1;
	else
		tmp = x * (1.0 + (a * ((t + (z * (b + (y / a)))) / x)));
	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, 1e+291], t$95$1, N[(x * N[(1.0 + N[(a * N[(N[(t + N[(z * N[(b + N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $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 10^{+291}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + a \cdot \frac{t + z \cdot \left(b + \frac{y}{a}\right)}{x}\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)) < 9.9999999999999996e290

    1. Initial program 99.9%

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

    if 9.9999999999999996e290 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b))

    1. Initial program 64.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+64.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*75.0%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified75.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 a around inf 77.1%

      \[\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 x around inf 82.1%

      \[\leadsto \color{blue}{x \cdot \left(1 + \frac{a \cdot \left(t + \left(b \cdot z + \frac{y \cdot z}{a}\right)\right)}{x}\right)} \]
    7. Step-by-step derivation
      1. associate-/l*82.1%

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

        \[\leadsto x \cdot \left(1 + a \cdot \frac{t + \left(\color{blue}{z \cdot b} + \frac{y \cdot z}{a}\right)}{x}\right) \]
      3. associate-*l/91.0%

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

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

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

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

    \[\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 10^{+291}:\\ \;\;\;\;\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(z \cdot a\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 + a \cdot \frac{t + z \cdot \left(b + \frac{y}{a}\right)}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

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

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified27.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 88.9%

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

    \[\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 3: 80.1% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -3.7 \cdot 10^{-45}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.6 \cdot 10^{-144}:\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\

\mathbf{elif}\;z \leq 6.1 \cdot 10^{+122}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.19999999999999994e109 or 6.0999999999999998e122 < z

    1. Initial program 78.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+78.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*79.3%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified79.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 z around inf 91.2%

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

    if -1.19999999999999994e109 < z < -3.7e-45 or -1.59999999999999986e-144 < z < 6.0999999999999998e122

    1. Initial program 98.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+98.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*98.1%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified98.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 b around 0 85.7%

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

    if -3.7e-45 < z < -1.59999999999999986e-144

    1. Initial program 99.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+99.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*99.9%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified99.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 87.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+109}:\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-45}:\\ \;\;\;\;x + \left(y \cdot z + t \cdot a\right)\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-144}:\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \mathbf{elif}\;z \leq 6.1 \cdot 10^{+122}:\\ \;\;\;\;x + \left(y \cdot z + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 39.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot a\right) \cdot b\\ \mathbf{if}\;t \leq -4.2 \cdot 10^{-28}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-283}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-237}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.95 \cdot 10^{-161}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot a\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (* z a) b)))
   (if (<= t -4.2e-28)
     (* t a)
     (if (<= t -7e-283)
       t_1
       (if (<= t 2.7e-237)
         x
         (if (<= t 2.95e-161) t_1 (if (<= t 2.1e-28) x (* t a))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z * a) * b;
	double tmp;
	if (t <= -4.2e-28) {
		tmp = t * a;
	} else if (t <= -7e-283) {
		tmp = t_1;
	} else if (t <= 2.7e-237) {
		tmp = x;
	} else if (t <= 2.95e-161) {
		tmp = t_1;
	} else if (t <= 2.1e-28) {
		tmp = x;
	} else {
		tmp = t * 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 = (z * a) * b
    if (t <= (-4.2d-28)) then
        tmp = t * a
    else if (t <= (-7d-283)) then
        tmp = t_1
    else if (t <= 2.7d-237) then
        tmp = x
    else if (t <= 2.95d-161) then
        tmp = t_1
    else if (t <= 2.1d-28) then
        tmp = x
    else
        tmp = t * 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 = (z * a) * b;
	double tmp;
	if (t <= -4.2e-28) {
		tmp = t * a;
	} else if (t <= -7e-283) {
		tmp = t_1;
	} else if (t <= 2.7e-237) {
		tmp = x;
	} else if (t <= 2.95e-161) {
		tmp = t_1;
	} else if (t <= 2.1e-28) {
		tmp = x;
	} else {
		tmp = t * a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z * a) * b
	tmp = 0
	if t <= -4.2e-28:
		tmp = t * a
	elif t <= -7e-283:
		tmp = t_1
	elif t <= 2.7e-237:
		tmp = x
	elif t <= 2.95e-161:
		tmp = t_1
	elif t <= 2.1e-28:
		tmp = x
	else:
		tmp = t * a
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z * a) * b)
	tmp = 0.0
	if (t <= -4.2e-28)
		tmp = Float64(t * a);
	elseif (t <= -7e-283)
		tmp = t_1;
	elseif (t <= 2.7e-237)
		tmp = x;
	elseif (t <= 2.95e-161)
		tmp = t_1;
	elseif (t <= 2.1e-28)
		tmp = x;
	else
		tmp = Float64(t * a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z * a) * b;
	tmp = 0.0;
	if (t <= -4.2e-28)
		tmp = t * a;
	elseif (t <= -7e-283)
		tmp = t_1;
	elseif (t <= 2.7e-237)
		tmp = x;
	elseif (t <= 2.95e-161)
		tmp = t_1;
	elseif (t <= 2.1e-28)
		tmp = x;
	else
		tmp = t * a;
	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[t, -4.2e-28], N[(t * a), $MachinePrecision], If[LessEqual[t, -7e-283], t$95$1, If[LessEqual[t, 2.7e-237], x, If[LessEqual[t, 2.95e-161], t$95$1, If[LessEqual[t, 2.1e-28], x, N[(t * a), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -7 \cdot 10^{-283}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.7 \cdot 10^{-237}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 2.95 \cdot 10^{-161}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.1 \cdot 10^{-28}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.20000000000000013e-28 or 2.10000000000000006e-28 < t

    1. Initial program 89.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+89.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*91.5%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified91.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 t around inf 52.5%

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

    if -4.20000000000000013e-28 < t < -6.9999999999999997e-283 or 2.69999999999999984e-237 < t < 2.9500000000000001e-161

    1. Initial program 94.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+94.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*89.3%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified89.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 76.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 42.5%

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

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

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

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

    if -6.9999999999999997e-283 < t < 2.69999999999999984e-237 or 2.9500000000000001e-161 < t < 2.10000000000000006e-28

    1. Initial program 96.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+96.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*100.0%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified100.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 x around inf 47.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{-28}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-283}:\\ \;\;\;\;\left(z \cdot a\right) \cdot b\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-237}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.95 \cdot 10^{-161}:\\ \;\;\;\;\left(z \cdot a\right) \cdot b\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 39.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(z \cdot b\right)\\ \mathbf{if}\;t \leq -7.2 \cdot 10^{-60}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-271}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-186}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{-161}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot a\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (* z b))))
   (if (<= t -7.2e-60)
     (* t a)
     (if (<= t 4e-271)
       t_1
       (if (<= t 2.2e-186)
         (* y z)
         (if (<= t 2.15e-161) t_1 (if (<= t 1.9e-28) x (* t a))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (z * b);
	double tmp;
	if (t <= -7.2e-60) {
		tmp = t * a;
	} else if (t <= 4e-271) {
		tmp = t_1;
	} else if (t <= 2.2e-186) {
		tmp = y * z;
	} else if (t <= 2.15e-161) {
		tmp = t_1;
	} else if (t <= 1.9e-28) {
		tmp = x;
	} else {
		tmp = t * 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 = a * (z * b)
    if (t <= (-7.2d-60)) then
        tmp = t * a
    else if (t <= 4d-271) then
        tmp = t_1
    else if (t <= 2.2d-186) then
        tmp = y * z
    else if (t <= 2.15d-161) then
        tmp = t_1
    else if (t <= 1.9d-28) then
        tmp = x
    else
        tmp = t * 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 = a * (z * b);
	double tmp;
	if (t <= -7.2e-60) {
		tmp = t * a;
	} else if (t <= 4e-271) {
		tmp = t_1;
	} else if (t <= 2.2e-186) {
		tmp = y * z;
	} else if (t <= 2.15e-161) {
		tmp = t_1;
	} else if (t <= 1.9e-28) {
		tmp = x;
	} else {
		tmp = t * a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (z * b)
	tmp = 0
	if t <= -7.2e-60:
		tmp = t * a
	elif t <= 4e-271:
		tmp = t_1
	elif t <= 2.2e-186:
		tmp = y * z
	elif t <= 2.15e-161:
		tmp = t_1
	elif t <= 1.9e-28:
		tmp = x
	else:
		tmp = t * a
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(z * b))
	tmp = 0.0
	if (t <= -7.2e-60)
		tmp = Float64(t * a);
	elseif (t <= 4e-271)
		tmp = t_1;
	elseif (t <= 2.2e-186)
		tmp = Float64(y * z);
	elseif (t <= 2.15e-161)
		tmp = t_1;
	elseif (t <= 1.9e-28)
		tmp = x;
	else
		tmp = Float64(t * a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (z * b);
	tmp = 0.0;
	if (t <= -7.2e-60)
		tmp = t * a;
	elseif (t <= 4e-271)
		tmp = t_1;
	elseif (t <= 2.2e-186)
		tmp = y * z;
	elseif (t <= 2.15e-161)
		tmp = t_1;
	elseif (t <= 1.9e-28)
		tmp = x;
	else
		tmp = t * a;
	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[t, -7.2e-60], N[(t * a), $MachinePrecision], If[LessEqual[t, 4e-271], t$95$1, If[LessEqual[t, 2.2e-186], N[(y * z), $MachinePrecision], If[LessEqual[t, 2.15e-161], t$95$1, If[LessEqual[t, 1.9e-28], x, N[(t * a), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 4 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{-186}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;t \leq 2.15 \cdot 10^{-161}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.9 \cdot 10^{-28}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.2e-60 or 1.90000000000000005e-28 < t

    1. Initial program 90.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+90.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*91.0%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified91.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 t around inf 49.7%

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

    if -7.2e-60 < t < 3.99999999999999985e-271 or 2.20000000000000013e-186 < t < 2.14999999999999983e-161

    1. Initial program 90.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+90.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*90.8%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified90.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 a around inf 81.8%

      \[\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 49.0%

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

    if 3.99999999999999985e-271 < t < 2.20000000000000013e-186

    1. Initial program 99.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+99.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*99.9%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified99.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 y around inf 47.9%

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

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

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

    if 2.14999999999999983e-161 < t < 1.90000000000000005e-28

    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.9%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified99.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 x around inf 46.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{-60}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-271}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-186}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{-161}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 60.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -8.8 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -6.8 \cdot 10^{-102}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 1.85 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.1e108 or -8.8000000000000002e-88 < z < -6.80000000000000026e-102

    1. Initial program 76.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+76.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*76.0%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified76.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 a around inf 70.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 56.8%

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

    if -8.1e108 < z < -8.8000000000000002e-88 or -6.80000000000000026e-102 < z < 1.84999999999999997e65

    1. Initial program 98.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+98.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*98.8%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified98.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 0 71.2%

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

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

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

    if 1.84999999999999997e65 < z

    1. Initial program 88.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+88.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*88.9%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified88.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 0 64.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.1 \cdot 10^{+108}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{-88}:\\ \;\;\;\;x + t \cdot a\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-102}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+65}:\\ \;\;\;\;x + t \cdot a\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot z\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 83.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -2.8 \cdot 10^{-144}:\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{+32}:\\
\;\;\;\;x + \left(y \cdot z + t \cdot a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.70000000000000003e-6 or 1.19999999999999996e32 < z

    1. Initial program 82.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+82.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*83.8%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified83.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 80.4%

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

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

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

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

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

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

    if -1.70000000000000003e-6 < z < -2.79999999999999998e-144

    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*99.9%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified99.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 81.3%

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

    if -2.79999999999999998e-144 < z < 1.19999999999999996e32

    1. Initial program 99.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+99.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*100.0%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified100.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 b around 0 88.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{-6}:\\ \;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-144}:\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+32}:\\ \;\;\;\;x + \left(y \cdot z + t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 39.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{-34}:\\
\;\;\;\;t \cdot a\\

\mathbf{elif}\;t \leq 1.65 \cdot 10^{-246}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 5 \cdot 10^{-161}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;t \leq 5 \cdot 10^{-32}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.60000000000000022e-34 or 5e-32 < t

    1. Initial program 89.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+89.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*91.1%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified91.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 t around inf 51.8%

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

    if -4.60000000000000022e-34 < t < 1.65e-246 or 4.9999999999999999e-161 < t < 5e-32

    1. Initial program 95.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+95.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*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 x around inf 42.4%

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

    if 1.65e-246 < t < 4.9999999999999999e-161

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.6 \cdot 10^{-34}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-246}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-161}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-32}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 69.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -7.8 \cdot 10^{-188}:\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\

\mathbf{elif}\;z \leq 3.05 \cdot 10^{+122}:\\
\;\;\;\;x + t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -0.0071999999999999998 or 3.0499999999999999e122 < z

    1. Initial program 82.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+82.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*83.6%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified83.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 z around inf 85.8%

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

    if -0.0071999999999999998 < z < -7.79999999999999954e-188

    1. Initial program 99.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+99.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*99.9%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified99.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 79.6%

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

    if -7.79999999999999954e-188 < z < 3.0499999999999999e122

    1. Initial program 98.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+98.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*98.2%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified98.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 z around 0 77.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.0072:\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-188}:\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \mathbf{elif}\;z \leq 3.05 \cdot 10^{+122}:\\ \;\;\;\;x + t \cdot a\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 85.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.1 \cdot 10^{-28}:\\
\;\;\;\;x + \left(y \cdot z + t \cdot a\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.1000000000000002e-28

    1. Initial program 89.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+89.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*92.1%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified92.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 b around 0 89.8%

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

    if -4.1000000000000002e-28 < t < 4.79999999999999984e-29

    1. Initial program 95.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+95.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*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 t around 0 89.2%

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

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

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

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

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

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

    if 4.79999999999999984e-29 < t

    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. +-commutative88.9%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 52.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \leq 3 \cdot 10^{+16}:\\
\;\;\;\;x + y \cdot z\\

\mathbf{elif}\;b \leq 5.8 \cdot 10^{+180}:\\
\;\;\;\;t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -8.5000000000000001e198

    1. Initial program 95.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+95.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*84.9%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified84.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 84.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 62.5%

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

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

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

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

    if -8.5000000000000001e198 < b < 3e16

    1. Initial program 93.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+93.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.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 a around 0 60.3%

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

    if 3e16 < b < 5.80000000000000015e180

    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*85.3%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified85.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 57.2%

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

    if 5.80000000000000015e180 < b

    1. Initial program 89.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+89.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*86.6%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified86.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 inf 84.2%

      \[\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 72.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8.5 \cdot 10^{+198}:\\ \;\;\;\;\left(z \cdot a\right) \cdot b\\ \mathbf{elif}\;b \leq 3 \cdot 10^{+16}:\\ \;\;\;\;x + y \cdot z\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{+180}:\\ \;\;\;\;t \cdot a\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 94.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+102}:\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.75000000000000005e102

    1. Initial program 75.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+75.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*73.2%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified73.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 t around 0 75.3%

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

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

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

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

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

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

    if -1.75000000000000005e102 < z

    1. Initial program 96.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+96.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*97.6%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified97.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
  3. Recombined 2 regimes into one program.
  4. Final simplification97.3%

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

Alternative 13: 74.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.2 \cdot 10^{-13} \lor \neg \left(a \leq 1.4 \cdot 10^{-76}\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 -3.2e-13) (not (<= a 1.4e-76)))
   (* 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 <= -3.2e-13) || !(a <= 1.4e-76)) {
		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 <= (-3.2d-13)) .or. (.not. (a <= 1.4d-76))) 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 <= -3.2e-13) || !(a <= 1.4e-76)) {
		tmp = a * (t + (z * b));
	} else {
		tmp = x + (y * z);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (a <= -3.2e-13) or not (a <= 1.4e-76):
		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 <= -3.2e-13) || !(a <= 1.4e-76))
		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 <= -3.2e-13) || ~((a <= 1.4e-76)))
		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, -3.2e-13], N[Not[LessEqual[a, 1.4e-76]], $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 -3.2 \cdot 10^{-13} \lor \neg \left(a \leq 1.4 \cdot 10^{-76}\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 < -3.2e-13 or 1.40000000000000005e-76 < a

    1. Initial program 88.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+88.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*92.5%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified92.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 76.5%

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

    if -3.2e-13 < a < 1.40000000000000005e-76

    1. Initial program 98.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+98.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.9%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified92.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 0 79.8%

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

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

Alternative 14: 39.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.6 \cdot 10^{-35} \lor \neg \left(t \leq 2 \cdot 10^{-30}\right):\\
\;\;\;\;t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.6000000000000005e-35 or 2e-30 < t

    1. Initial program 89.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+89.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*91.1%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified91.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 t around inf 51.8%

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

    if -9.6000000000000005e-35 < t < 2e-30

    1. Initial program 95.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+95.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.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 x around inf 38.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.6 \cdot 10^{-35} \lor \neg \left(t \leq 2 \cdot 10^{-30}\right):\\ \;\;\;\;t \cdot a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 26.2% 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 92.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+92.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*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 x around inf 25.0%

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer target: 97.5% 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 2024101 
(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)))