Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1

Percentage Accurate: 92.4% → 96.5%
Time: 11.0s
Alternatives: 13
Speedup: 0.6×

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 13 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.4% 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: 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}:\\ \;\;\;\;x + 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 (+ x (* 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 = x + (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 = x + (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 = x + (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(x + 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 = x + (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[(x + N[(z * N[(y + N[(a * b), $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 \infty:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 98.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right) + x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.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 \infty:\\ \;\;\;\;\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(z \cdot a\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 40.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(z \cdot b\right)\\ \mathbf{if}\;a \leq -2.9 \cdot 10^{+168}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{+33}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-173}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq -1.36 \cdot 10^{-226}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-262}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-41}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+183} \lor \neg \left(a \leq 4.9 \cdot 10^{+235}\right):\\ \;\;\;\;t\_1\\ \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 (<= a -2.9e+168)
     (* t a)
     (if (<= a -4.6e+33)
       t_1
       (if (<= a -2.5e-173)
         (* y z)
         (if (<= a -1.36e-226)
           x
           (if (<= a -5.2e-262)
             (* y z)
             (if (<= a 4.4e-41)
               x
               (if (or (<= a 3.5e+183) (not (<= a 4.9e+235)))
                 t_1
                 (* 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 (a <= -2.9e+168) {
		tmp = t * a;
	} else if (a <= -4.6e+33) {
		tmp = t_1;
	} else if (a <= -2.5e-173) {
		tmp = y * z;
	} else if (a <= -1.36e-226) {
		tmp = x;
	} else if (a <= -5.2e-262) {
		tmp = y * z;
	} else if (a <= 4.4e-41) {
		tmp = x;
	} else if ((a <= 3.5e+183) || !(a <= 4.9e+235)) {
		tmp = t_1;
	} 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 (a <= (-2.9d+168)) then
        tmp = t * a
    else if (a <= (-4.6d+33)) then
        tmp = t_1
    else if (a <= (-2.5d-173)) then
        tmp = y * z
    else if (a <= (-1.36d-226)) then
        tmp = x
    else if (a <= (-5.2d-262)) then
        tmp = y * z
    else if (a <= 4.4d-41) then
        tmp = x
    else if ((a <= 3.5d+183) .or. (.not. (a <= 4.9d+235))) then
        tmp = t_1
    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 (a <= -2.9e+168) {
		tmp = t * a;
	} else if (a <= -4.6e+33) {
		tmp = t_1;
	} else if (a <= -2.5e-173) {
		tmp = y * z;
	} else if (a <= -1.36e-226) {
		tmp = x;
	} else if (a <= -5.2e-262) {
		tmp = y * z;
	} else if (a <= 4.4e-41) {
		tmp = x;
	} else if ((a <= 3.5e+183) || !(a <= 4.9e+235)) {
		tmp = t_1;
	} else {
		tmp = t * a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (z * b)
	tmp = 0
	if a <= -2.9e+168:
		tmp = t * a
	elif a <= -4.6e+33:
		tmp = t_1
	elif a <= -2.5e-173:
		tmp = y * z
	elif a <= -1.36e-226:
		tmp = x
	elif a <= -5.2e-262:
		tmp = y * z
	elif a <= 4.4e-41:
		tmp = x
	elif (a <= 3.5e+183) or not (a <= 4.9e+235):
		tmp = t_1
	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 (a <= -2.9e+168)
		tmp = Float64(t * a);
	elseif (a <= -4.6e+33)
		tmp = t_1;
	elseif (a <= -2.5e-173)
		tmp = Float64(y * z);
	elseif (a <= -1.36e-226)
		tmp = x;
	elseif (a <= -5.2e-262)
		tmp = Float64(y * z);
	elseif (a <= 4.4e-41)
		tmp = x;
	elseif ((a <= 3.5e+183) || !(a <= 4.9e+235))
		tmp = t_1;
	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 (a <= -2.9e+168)
		tmp = t * a;
	elseif (a <= -4.6e+33)
		tmp = t_1;
	elseif (a <= -2.5e-173)
		tmp = y * z;
	elseif (a <= -1.36e-226)
		tmp = x;
	elseif (a <= -5.2e-262)
		tmp = y * z;
	elseif (a <= 4.4e-41)
		tmp = x;
	elseif ((a <= 3.5e+183) || ~((a <= 4.9e+235)))
		tmp = t_1;
	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[a, -2.9e+168], N[(t * a), $MachinePrecision], If[LessEqual[a, -4.6e+33], t$95$1, If[LessEqual[a, -2.5e-173], N[(y * z), $MachinePrecision], If[LessEqual[a, -1.36e-226], x, If[LessEqual[a, -5.2e-262], N[(y * z), $MachinePrecision], If[LessEqual[a, 4.4e-41], x, If[Or[LessEqual[a, 3.5e+183], N[Not[LessEqual[a, 4.9e+235]], $MachinePrecision]], t$95$1, N[(t * a), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -4.6 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -2.5 \cdot 10^{-173}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;a \leq -1.36 \cdot 10^{-226}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq 4.4 \cdot 10^{-41}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 3.5 \cdot 10^{+183} \lor \neg \left(a \leq 4.9 \cdot 10^{+235}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.9e168 or 3.49999999999999987e183 < a < 4.8999999999999998e235

    1. Initial program 81.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+81.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*89.2%

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

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

    if -2.9e168 < a < -4.60000000000000021e33 or 4.4e-41 < a < 3.49999999999999987e183 or 4.8999999999999998e235 < a

    1. Initial program 87.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+87.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*91.7%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified91.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. Step-by-step derivation
      1. *-commutative91.7%

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

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

        \[\leadsto \left(x + y \cdot z\right) + \color{blue}{\left(t + z \cdot b\right) \cdot a} \]
      4. add-cube-cbrt93.0%

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

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

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

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

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

      \[\leadsto \left(x + y \cdot z\right) + \color{blue}{\left(\mathsf{fma}\left(z, b, t\right) \cdot {\left(\sqrt[3]{a}\right)}^{2}\right) \cdot \sqrt[3]{a}} \]
    7. Taylor expanded in b around inf 49.8%

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

    if -4.60000000000000021e33 < a < -2.5000000000000001e-173 or -1.35999999999999992e-226 < a < -5.1999999999999998e-262

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

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

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

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

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

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

    if -2.5000000000000001e-173 < a < -1.35999999999999992e-226 or -5.1999999999999998e-262 < a < 4.4e-41

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.9 \cdot 10^{+168}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{+33}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-173}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq -1.36 \cdot 10^{-226}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-262}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-41}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+183} \lor \neg \left(a \leq 4.9 \cdot 10^{+235}\right):\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 40.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot a\right) \cdot b\\ \mathbf{if}\;a \leq -2.6 \cdot 10^{+168}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;a \leq -2.65 \cdot 10^{+33}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-172}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{-223}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3.5 \cdot 10^{-255}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-47}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.35 \cdot 10^{+184}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+235}:\\ \;\;\;\;t \cdot a\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (* z a) b)))
   (if (<= a -2.6e+168)
     (* t a)
     (if (<= a -2.65e+33)
       t_1
       (if (<= a -1.75e-172)
         (* y z)
         (if (<= a -8.6e-223)
           x
           (if (<= a -3.5e-255)
             (* y z)
             (if (<= a 1.9e-47)
               x
               (if (<= a 3.35e+184)
                 t_1
                 (if (<= a 9.2e+235) (* t a) (* a (* z b))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z * a) * b;
	double tmp;
	if (a <= -2.6e+168) {
		tmp = t * a;
	} else if (a <= -2.65e+33) {
		tmp = t_1;
	} else if (a <= -1.75e-172) {
		tmp = y * z;
	} else if (a <= -8.6e-223) {
		tmp = x;
	} else if (a <= -3.5e-255) {
		tmp = y * z;
	} else if (a <= 1.9e-47) {
		tmp = x;
	} else if (a <= 3.35e+184) {
		tmp = t_1;
	} else if (a <= 9.2e+235) {
		tmp = t * a;
	} else {
		tmp = a * (z * b);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z * a) * b
    if (a <= (-2.6d+168)) then
        tmp = t * a
    else if (a <= (-2.65d+33)) then
        tmp = t_1
    else if (a <= (-1.75d-172)) then
        tmp = y * z
    else if (a <= (-8.6d-223)) then
        tmp = x
    else if (a <= (-3.5d-255)) then
        tmp = y * z
    else if (a <= 1.9d-47) then
        tmp = x
    else if (a <= 3.35d+184) then
        tmp = t_1
    else if (a <= 9.2d+235) then
        tmp = t * a
    else
        tmp = a * (z * b)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z * a) * b;
	double tmp;
	if (a <= -2.6e+168) {
		tmp = t * a;
	} else if (a <= -2.65e+33) {
		tmp = t_1;
	} else if (a <= -1.75e-172) {
		tmp = y * z;
	} else if (a <= -8.6e-223) {
		tmp = x;
	} else if (a <= -3.5e-255) {
		tmp = y * z;
	} else if (a <= 1.9e-47) {
		tmp = x;
	} else if (a <= 3.35e+184) {
		tmp = t_1;
	} else if (a <= 9.2e+235) {
		tmp = t * a;
	} else {
		tmp = a * (z * b);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z * a) * b
	tmp = 0
	if a <= -2.6e+168:
		tmp = t * a
	elif a <= -2.65e+33:
		tmp = t_1
	elif a <= -1.75e-172:
		tmp = y * z
	elif a <= -8.6e-223:
		tmp = x
	elif a <= -3.5e-255:
		tmp = y * z
	elif a <= 1.9e-47:
		tmp = x
	elif a <= 3.35e+184:
		tmp = t_1
	elif a <= 9.2e+235:
		tmp = t * a
	else:
		tmp = a * (z * b)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z * a) * b)
	tmp = 0.0
	if (a <= -2.6e+168)
		tmp = Float64(t * a);
	elseif (a <= -2.65e+33)
		tmp = t_1;
	elseif (a <= -1.75e-172)
		tmp = Float64(y * z);
	elseif (a <= -8.6e-223)
		tmp = x;
	elseif (a <= -3.5e-255)
		tmp = Float64(y * z);
	elseif (a <= 1.9e-47)
		tmp = x;
	elseif (a <= 3.35e+184)
		tmp = t_1;
	elseif (a <= 9.2e+235)
		tmp = Float64(t * a);
	else
		tmp = Float64(a * Float64(z * b));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z * a) * b;
	tmp = 0.0;
	if (a <= -2.6e+168)
		tmp = t * a;
	elseif (a <= -2.65e+33)
		tmp = t_1;
	elseif (a <= -1.75e-172)
		tmp = y * z;
	elseif (a <= -8.6e-223)
		tmp = x;
	elseif (a <= -3.5e-255)
		tmp = y * z;
	elseif (a <= 1.9e-47)
		tmp = x;
	elseif (a <= 3.35e+184)
		tmp = t_1;
	elseif (a <= 9.2e+235)
		tmp = t * a;
	else
		tmp = a * (z * b);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[a, -2.6e+168], N[(t * a), $MachinePrecision], If[LessEqual[a, -2.65e+33], t$95$1, If[LessEqual[a, -1.75e-172], N[(y * z), $MachinePrecision], If[LessEqual[a, -8.6e-223], x, If[LessEqual[a, -3.5e-255], N[(y * z), $MachinePrecision], If[LessEqual[a, 1.9e-47], x, If[LessEqual[a, 3.35e+184], t$95$1, If[LessEqual[a, 9.2e+235], N[(t * a), $MachinePrecision], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2.65 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -1.75 \cdot 10^{-172}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;a \leq -8.6 \cdot 10^{-223}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -3.5 \cdot 10^{-255}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;a \leq 1.9 \cdot 10^{-47}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 3.35 \cdot 10^{+184}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 9.2 \cdot 10^{+235}:\\
\;\;\;\;t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.6e168 or 3.35e184 < a < 9.2e235

    1. Initial program 81.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+81.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*89.2%

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

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

    if -2.6e168 < a < -2.65000000000000012e33 or 1.90000000000000007e-47 < a < 3.35e184

    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*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. Step-by-step derivation
      1. *-commutative92.6%

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

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

        \[\leadsto \left(x + y \cdot z\right) + \color{blue}{\left(t + z \cdot b\right) \cdot a} \]
      4. add-cube-cbrt93.0%

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

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

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

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

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

      \[\leadsto \left(x + y \cdot z\right) + \color{blue}{\left(\mathsf{fma}\left(z, b, t\right) \cdot {\left(\sqrt[3]{a}\right)}^{2}\right) \cdot \sqrt[3]{a}} \]
    7. Taylor expanded in b around inf 47.7%

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

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

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

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

    if -2.65000000000000012e33 < a < -1.75000000000000014e-172 or -8.5999999999999998e-223 < a < -3.49999999999999979e-255

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

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

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

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

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

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

    if -1.75000000000000014e-172 < a < -8.5999999999999998e-223 or -3.49999999999999979e-255 < a < 1.90000000000000007e-47

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

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

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

    if 9.2e235 < a

    1. Initial program 79.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+79.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*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. Step-by-step derivation
      1. *-commutative86.6%

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

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

        \[\leadsto \left(x + y \cdot z\right) + \color{blue}{\left(t + z \cdot b\right) \cdot a} \]
      4. add-cube-cbrt93.0%

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

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

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

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

        \[\leadsto \left(x + y \cdot z\right) + \left(\mathsf{fma}\left(z, b, t\right) \cdot \color{blue}{{\left(\sqrt[3]{a}\right)}^{2}}\right) \cdot \sqrt[3]{a} \]
    6. Applied egg-rr93.0%

      \[\leadsto \left(x + y \cdot z\right) + \color{blue}{\left(\mathsf{fma}\left(z, b, t\right) \cdot {\left(\sqrt[3]{a}\right)}^{2}\right) \cdot \sqrt[3]{a}} \]
    7. Taylor expanded in b around inf 61.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.6 \cdot 10^{+168}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;a \leq -2.65 \cdot 10^{+33}:\\ \;\;\;\;\left(z \cdot a\right) \cdot b\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-172}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{-223}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3.5 \cdot 10^{-255}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-47}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.35 \cdot 10^{+184}:\\ \;\;\;\;\left(z \cdot a\right) \cdot b\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+235}:\\ \;\;\;\;t \cdot a\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 73.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot z\\ t_2 := a \cdot \left(t + z \cdot b\right)\\ t_3 := z \cdot \left(y + a \cdot b\right)\\ \mathbf{if}\;a \leq -3.7 \cdot 10^{+58}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-28}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-46}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -4.3 \cdot 10^{-85}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-48}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+31}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{+88}:\\ \;\;\;\;x + t \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* y z)))
        (t_2 (* a (+ t (* z b))))
        (t_3 (* z (+ y (* a b)))))
   (if (<= a -3.7e+58)
     t_2
     (if (<= a -8e-28)
       t_1
       (if (<= a -3.1e-46)
         t_2
         (if (<= a -4.3e-85)
           t_3
           (if (<= a 1.45e-48)
             t_1
             (if (<= a 3.3e+31)
               t_3
               (if (<= a 4.2e+88) (+ x (* t a)) t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * z);
	double t_2 = a * (t + (z * b));
	double t_3 = z * (y + (a * b));
	double tmp;
	if (a <= -3.7e+58) {
		tmp = t_2;
	} else if (a <= -8e-28) {
		tmp = t_1;
	} else if (a <= -3.1e-46) {
		tmp = t_2;
	} else if (a <= -4.3e-85) {
		tmp = t_3;
	} else if (a <= 1.45e-48) {
		tmp = t_1;
	} else if (a <= 3.3e+31) {
		tmp = t_3;
	} else if (a <= 4.2e+88) {
		tmp = x + (t * a);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x + (y * z)
    t_2 = a * (t + (z * b))
    t_3 = z * (y + (a * b))
    if (a <= (-3.7d+58)) then
        tmp = t_2
    else if (a <= (-8d-28)) then
        tmp = t_1
    else if (a <= (-3.1d-46)) then
        tmp = t_2
    else if (a <= (-4.3d-85)) then
        tmp = t_3
    else if (a <= 1.45d-48) then
        tmp = t_1
    else if (a <= 3.3d+31) then
        tmp = t_3
    else if (a <= 4.2d+88) then
        tmp = x + (t * a)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * z);
	double t_2 = a * (t + (z * b));
	double t_3 = z * (y + (a * b));
	double tmp;
	if (a <= -3.7e+58) {
		tmp = t_2;
	} else if (a <= -8e-28) {
		tmp = t_1;
	} else if (a <= -3.1e-46) {
		tmp = t_2;
	} else if (a <= -4.3e-85) {
		tmp = t_3;
	} else if (a <= 1.45e-48) {
		tmp = t_1;
	} else if (a <= 3.3e+31) {
		tmp = t_3;
	} else if (a <= 4.2e+88) {
		tmp = x + (t * a);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (y * z)
	t_2 = a * (t + (z * b))
	t_3 = z * (y + (a * b))
	tmp = 0
	if a <= -3.7e+58:
		tmp = t_2
	elif a <= -8e-28:
		tmp = t_1
	elif a <= -3.1e-46:
		tmp = t_2
	elif a <= -4.3e-85:
		tmp = t_3
	elif a <= 1.45e-48:
		tmp = t_1
	elif a <= 3.3e+31:
		tmp = t_3
	elif a <= 4.2e+88:
		tmp = x + (t * a)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(y * z))
	t_2 = Float64(a * Float64(t + Float64(z * b)))
	t_3 = Float64(z * Float64(y + Float64(a * b)))
	tmp = 0.0
	if (a <= -3.7e+58)
		tmp = t_2;
	elseif (a <= -8e-28)
		tmp = t_1;
	elseif (a <= -3.1e-46)
		tmp = t_2;
	elseif (a <= -4.3e-85)
		tmp = t_3;
	elseif (a <= 1.45e-48)
		tmp = t_1;
	elseif (a <= 3.3e+31)
		tmp = t_3;
	elseif (a <= 4.2e+88)
		tmp = Float64(x + Float64(t * a));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (y * z);
	t_2 = a * (t + (z * b));
	t_3 = z * (y + (a * b));
	tmp = 0.0;
	if (a <= -3.7e+58)
		tmp = t_2;
	elseif (a <= -8e-28)
		tmp = t_1;
	elseif (a <= -3.1e-46)
		tmp = t_2;
	elseif (a <= -4.3e-85)
		tmp = t_3;
	elseif (a <= 1.45e-48)
		tmp = t_1;
	elseif (a <= 3.3e+31)
		tmp = t_3;
	elseif (a <= 4.2e+88)
		tmp = x + (t * a);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.7e+58], t$95$2, If[LessEqual[a, -8e-28], t$95$1, If[LessEqual[a, -3.1e-46], t$95$2, If[LessEqual[a, -4.3e-85], t$95$3, If[LessEqual[a, 1.45e-48], t$95$1, If[LessEqual[a, 3.3e+31], t$95$3, If[LessEqual[a, 4.2e+88], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -8 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -3.1 \cdot 10^{-46}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq -4.3 \cdot 10^{-85}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;a \leq 1.45 \cdot 10^{-48}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 3.3 \cdot 10^{+31}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;a \leq 4.2 \cdot 10^{+88}:\\
\;\;\;\;x + t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.7000000000000002e58 or -7.99999999999999977e-28 < a < -3.1000000000000001e-46 or 4.2e88 < a

    1. Initial program 84.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+84.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*90.5%

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

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

    if -3.7000000000000002e58 < a < -7.99999999999999977e-28 or -4.29999999999999999e-85 < a < 1.4500000000000001e-48

    1. Initial program 99.0%

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

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

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

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

    if -3.1000000000000001e-46 < a < -4.29999999999999999e-85 or 1.4500000000000001e-48 < a < 3.29999999999999992e31

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

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

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

    if 3.29999999999999992e31 < a < 4.2e88

    1. Initial program 83.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+83.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*83.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.7 \cdot 10^{+58}:\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-28}:\\ \;\;\;\;x + y \cdot z\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-46}:\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \mathbf{elif}\;a \leq -4.3 \cdot 10^{-85}:\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-48}:\\ \;\;\;\;x + y \cdot z\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+31}:\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{+88}:\\ \;\;\;\;x + t \cdot a\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 39.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{+58}:\\
\;\;\;\;t \cdot a\\

\mathbf{elif}\;a \leq -5 \cdot 10^{-177}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;a \leq -3.35 \cdot 10^{-226}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq 6.4 \cdot 10^{+37}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.20000000000000024e58 or 6.40000000000000027e37 < a

    1. Initial program 83.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+83.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*89.5%

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

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

    if -4.20000000000000024e58 < a < -5e-177 or -3.3500000000000001e-226 < a < -2.60000000000000021e-255

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

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

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

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

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

    if -5e-177 < a < -3.3500000000000001e-226 or -2.60000000000000021e-255 < a < 6.40000000000000027e37

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.2 \cdot 10^{+58}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-177}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq -3.35 \cdot 10^{-226}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-255}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{+37}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 81.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{+179}:\\
\;\;\;\;x + t \cdot a\\

\mathbf{elif}\;x \leq -5.8 \cdot 10^{-47} \lor \neg \left(x \leq 7.5 \cdot 10^{-19}\right):\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.4999999999999998e179

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

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

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

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

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

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

    if -5.4999999999999998e179 < x < -5.8000000000000001e-47 or 7.49999999999999957e-19 < x

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

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

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

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

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

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

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

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

    if -5.8000000000000001e-47 < x < 7.49999999999999957e-19

    1. Initial program 90.3%

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

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

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

Alternative 7: 95.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+182} \lor \neg \left(z \leq 1.2 \cdot 10^{+158}\right):\\ \;\;\;\;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 (or (<= z -7.6e+182) (not (<= z 1.2e+158)))
   (+ 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 <= -7.6e+182) || !(z <= 1.2e+158)) {
		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 <= (-7.6d+182)) .or. (.not. (z <= 1.2d+158))) 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 <= -7.6e+182) || !(z <= 1.2e+158)) {
		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 <= -7.6e+182) or not (z <= 1.2e+158):
		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 <= -7.6e+182) || !(z <= 1.2e+158))
		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 <= -7.6e+182) || ~((z <= 1.2e+158)))
		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[Or[LessEqual[z, -7.6e+182], N[Not[LessEqual[z, 1.2e+158]], $MachinePrecision]], 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 -7.6 \cdot 10^{+182} \lor \neg \left(z \leq 1.2 \cdot 10^{+158}\right):\\
\;\;\;\;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 < -7.60000000000000025e182 or 1.20000000000000004e158 < z

    1. Initial program 80.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+80.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*80.9%

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

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

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

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

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

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

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

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

    if -7.60000000000000025e182 < z < 1.20000000000000004e158

    1. Initial program 95.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+182} \lor \neg \left(z \leq 1.2 \cdot 10^{+158}\right):\\ \;\;\;\;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 8: 59.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{+168}:\\
\;\;\;\;t \cdot a\\

\mathbf{elif}\;a \leq -3.2 \cdot 10^{+34} \lor \neg \left(a \leq 1.7 \cdot 10^{+110}\right):\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.20000000000000006e168

    1. Initial program 84.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+84.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*92.3%

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

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

    if -4.20000000000000006e168 < a < -3.1999999999999998e34 or 1.7000000000000001e110 < a

    1. Initial program 85.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+85.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*89.9%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified89.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. Step-by-step derivation
      1. *-commutative89.9%

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

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

        \[\leadsto \left(x + y \cdot z\right) + \color{blue}{\left(t + z \cdot b\right) \cdot a} \]
      4. add-cube-cbrt93.0%

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

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

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

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

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

      \[\leadsto \left(x + y \cdot z\right) + \color{blue}{\left(\mathsf{fma}\left(z, b, t\right) \cdot {\left(\sqrt[3]{a}\right)}^{2}\right) \cdot \sqrt[3]{a}} \]
    7. Taylor expanded in b around inf 48.9%

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

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

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

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

    if -3.1999999999999998e34 < a < 1.7000000000000001e110

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

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

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

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

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

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

Alternative 9: 82.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.5 \cdot 10^{+58} \lor \neg \left(a \leq 1.1 \cdot 10^{+42}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.5000000000000002e58 or 1.1000000000000001e42 < a

    1. Initial program 83.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+83.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*89.5%

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

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

    if -9.5000000000000002e58 < a < 1.1000000000000001e42

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 74.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.7 \cdot 10^{+58} \lor \neg \left(a \leq 5.2 \cdot 10^{-45}\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.7e+58) (not (<= a 5.2e-45)))
   (* 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.7e+58) || !(a <= 5.2e-45)) {
		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.7d+58)) .or. (.not. (a <= 5.2d-45))) 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.7e+58) || !(a <= 5.2e-45)) {
		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.7e+58) or not (a <= 5.2e-45):
		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.7e+58) || !(a <= 5.2e-45))
		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.7e+58) || ~((a <= 5.2e-45)))
		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.7e+58], N[Not[LessEqual[a, 5.2e-45]], $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.7 \cdot 10^{+58} \lor \neg \left(a \leq 5.2 \cdot 10^{-45}\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.7000000000000002e58 or 5.19999999999999973e-45 < a

    1. Initial program 85.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+85.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*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 78.7%

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

    if -3.7000000000000002e58 < a < 5.19999999999999973e-45

    1. Initial program 99.1%

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

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

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

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

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

Alternative 11: 64.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+61} \lor \neg \left(y \leq 9.6 \cdot 10^{+57}\right):\\
\;\;\;\;x + y \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.9999999999999996e61 or 9.60000000000000019e57 < y

    1. Initial program 87.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+87.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*86.9%

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

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

    if -7.9999999999999996e61 < y < 9.60000000000000019e57

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

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

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

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

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

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

Alternative 12: 39.3% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.7 \cdot 10^{+58}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.69999999999999972e58 or 6e13 < x

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

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

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

    if -4.69999999999999972e58 < x < 6e13

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

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

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

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

Alternative 13: 26.5% 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.0%

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

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

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 97.2% 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 2024027 
(FPCore (x y z t a b)
  :name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
  :precision binary64

  :herbie-target
  (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)))