Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1

Percentage Accurate: 92.2% → 95.0%
Time: 12.5s
Alternatives: 15
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 92.2% accurate, 1.0× speedup?

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

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

Alternative 1: 95.0% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq 2.2 \cdot 10^{+166}:\\ \;\;\;\;\mathsf{fma}\left(y, z, x\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 (<= z 2.2e+166)
   (+ (fma y z x) (* 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 (z <= 2.2e+166) {
		tmp = fma(y, z, x) + (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 (z <= 2.2e+166)
		tmp = Float64(fma(y, z, x) + Float64(a * Float64(t + Float64(z * b))));
	else
		tmp = Float64(x + Float64(z * Float64(y + Float64(a * b))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 2.2e+166], N[(N[(y * z + x), $MachinePrecision] + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.2 \cdot 10^{+166}:\\
\;\;\;\;\mathsf{fma}\left(y, z, x\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 z < 2.1999999999999999e166

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-out97.6%

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{b \cdot z}\right)\right)\right) \]
      15. remove-double-neg97.6%

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

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

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

    if 2.1999999999999999e166 < z

    1. Initial program 77.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+77.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*77.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 2.2 \cdot 10^{+166}:\\ \;\;\;\;\mathsf{fma}\left(y, z, x\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 2: 39.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(z \cdot b\right)\\ \mathbf{if}\;a \leq -1.25 \cdot 10^{+82}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-83}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-158}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-96}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;a \leq 140000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{+129} \lor \neg \left(a \leq 1.9 \cdot 10^{+220}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (* z b))))
   (if (<= a -1.25e+82)
     (* a t)
     (if (<= a -2.5e-83)
       t_1
       (if (<= a -4.2e-158)
         x
         (if (<= a 3.9e-96)
           (* z y)
           (if (<= a 140000000000.0)
             x
             (if (or (<= a 1.95e+129) (not (<= a 1.9e+220)))
               t_1
               (* a t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (z * b);
	double tmp;
	if (a <= -1.25e+82) {
		tmp = a * t;
	} else if (a <= -2.5e-83) {
		tmp = t_1;
	} else if (a <= -4.2e-158) {
		tmp = x;
	} else if (a <= 3.9e-96) {
		tmp = z * y;
	} else if (a <= 140000000000.0) {
		tmp = x;
	} else if ((a <= 1.95e+129) || !(a <= 1.9e+220)) {
		tmp = t_1;
	} else {
		tmp = a * t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = a * (z * b)
    if (a <= (-1.25d+82)) then
        tmp = a * t
    else if (a <= (-2.5d-83)) then
        tmp = t_1
    else if (a <= (-4.2d-158)) then
        tmp = x
    else if (a <= 3.9d-96) then
        tmp = z * y
    else if (a <= 140000000000.0d0) then
        tmp = x
    else if ((a <= 1.95d+129) .or. (.not. (a <= 1.9d+220))) then
        tmp = t_1
    else
        tmp = a * t
    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 <= -1.25e+82) {
		tmp = a * t;
	} else if (a <= -2.5e-83) {
		tmp = t_1;
	} else if (a <= -4.2e-158) {
		tmp = x;
	} else if (a <= 3.9e-96) {
		tmp = z * y;
	} else if (a <= 140000000000.0) {
		tmp = x;
	} else if ((a <= 1.95e+129) || !(a <= 1.9e+220)) {
		tmp = t_1;
	} else {
		tmp = a * t;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (z * b)
	tmp = 0
	if a <= -1.25e+82:
		tmp = a * t
	elif a <= -2.5e-83:
		tmp = t_1
	elif a <= -4.2e-158:
		tmp = x
	elif a <= 3.9e-96:
		tmp = z * y
	elif a <= 140000000000.0:
		tmp = x
	elif (a <= 1.95e+129) or not (a <= 1.9e+220):
		tmp = t_1
	else:
		tmp = a * t
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(z * b))
	tmp = 0.0
	if (a <= -1.25e+82)
		tmp = Float64(a * t);
	elseif (a <= -2.5e-83)
		tmp = t_1;
	elseif (a <= -4.2e-158)
		tmp = x;
	elseif (a <= 3.9e-96)
		tmp = Float64(z * y);
	elseif (a <= 140000000000.0)
		tmp = x;
	elseif ((a <= 1.95e+129) || !(a <= 1.9e+220))
		tmp = t_1;
	else
		tmp = Float64(a * t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (z * b);
	tmp = 0.0;
	if (a <= -1.25e+82)
		tmp = a * t;
	elseif (a <= -2.5e-83)
		tmp = t_1;
	elseif (a <= -4.2e-158)
		tmp = x;
	elseif (a <= 3.9e-96)
		tmp = z * y;
	elseif (a <= 140000000000.0)
		tmp = x;
	elseif ((a <= 1.95e+129) || ~((a <= 1.9e+220)))
		tmp = t_1;
	else
		tmp = a * t;
	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, -1.25e+82], N[(a * t), $MachinePrecision], If[LessEqual[a, -2.5e-83], t$95$1, If[LessEqual[a, -4.2e-158], x, If[LessEqual[a, 3.9e-96], N[(z * y), $MachinePrecision], If[LessEqual[a, 140000000000.0], x, If[Or[LessEqual[a, 1.95e+129], N[Not[LessEqual[a, 1.9e+220]], $MachinePrecision]], t$95$1, N[(a * t), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2.5 \cdot 10^{-83}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -4.2 \cdot 10^{-158}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 3.9 \cdot 10^{-96}:\\
\;\;\;\;z \cdot y\\

\mathbf{elif}\;a \leq 140000000000:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.95 \cdot 10^{+129} \lor \neg \left(a \leq 1.9 \cdot 10^{+220}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.25000000000000004e82 or 1.9499999999999999e129 < a < 1.89999999999999992e220

    1. Initial program 92.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+92.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*95.2%

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

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

    if -1.25000000000000004e82 < a < -2.5e-83 or 1.4e11 < a < 1.9499999999999999e129 or 1.89999999999999992e220 < a

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

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

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

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

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

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

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

    if -2.5e-83 < a < -4.19999999999999983e-158 or 3.8999999999999998e-96 < a < 1.4e11

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

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

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

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

    if -4.19999999999999983e-158 < a < 3.8999999999999998e-96

    1. Initial program 98.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.25 \cdot 10^{+82}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-83}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-158}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-96}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;a \leq 140000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{+129} \lor \neg \left(a \leq 1.9 \cdot 10^{+220}\right):\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 38.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(a \cdot b\right)\\ \mathbf{if}\;a \leq -2.85 \cdot 10^{+81}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;a \leq -3.7 \cdot 10^{-83}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -6.4 \cdot 10^{-158}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.15 \cdot 10^{-96}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;a \leq 2.35 \cdot 10^{+17}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* z (* a b))))
   (if (<= a -2.85e+81)
     (* a t)
     (if (<= a -3.7e-83)
       t_1
       (if (<= a -6.4e-158)
         x
         (if (<= a 3.15e-96) (* z y) (if (<= a 2.35e+17) x t_1)))))))
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.85e+81) {
		tmp = a * t;
	} else if (a <= -3.7e-83) {
		tmp = t_1;
	} else if (a <= -6.4e-158) {
		tmp = x;
	} else if (a <= 3.15e-96) {
		tmp = z * y;
	} else if (a <= 2.35e+17) {
		tmp = 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 * (a * b)
    if (a <= (-2.85d+81)) then
        tmp = a * t
    else if (a <= (-3.7d-83)) then
        tmp = t_1
    else if (a <= (-6.4d-158)) then
        tmp = x
    else if (a <= 3.15d-96) then
        tmp = z * y
    else if (a <= 2.35d+17) then
        tmp = 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 * (a * b);
	double tmp;
	if (a <= -2.85e+81) {
		tmp = a * t;
	} else if (a <= -3.7e-83) {
		tmp = t_1;
	} else if (a <= -6.4e-158) {
		tmp = x;
	} else if (a <= 3.15e-96) {
		tmp = z * y;
	} else if (a <= 2.35e+17) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (a * b)
	tmp = 0
	if a <= -2.85e+81:
		tmp = a * t
	elif a <= -3.7e-83:
		tmp = t_1
	elif a <= -6.4e-158:
		tmp = x
	elif a <= 3.15e-96:
		tmp = z * y
	elif a <= 2.35e+17:
		tmp = x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z * Float64(a * b))
	tmp = 0.0
	if (a <= -2.85e+81)
		tmp = Float64(a * t);
	elseif (a <= -3.7e-83)
		tmp = t_1;
	elseif (a <= -6.4e-158)
		tmp = x;
	elseif (a <= 3.15e-96)
		tmp = Float64(z * y);
	elseif (a <= 2.35e+17)
		tmp = x;
	else
		tmp = t_1;
	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.85e+81)
		tmp = a * t;
	elseif (a <= -3.7e-83)
		tmp = t_1;
	elseif (a <= -6.4e-158)
		tmp = x;
	elseif (a <= 3.15e-96)
		tmp = z * y;
	elseif (a <= 2.35e+17)
		tmp = x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.85e+81], N[(a * t), $MachinePrecision], If[LessEqual[a, -3.7e-83], t$95$1, If[LessEqual[a, -6.4e-158], x, If[LessEqual[a, 3.15e-96], N[(z * y), $MachinePrecision], If[LessEqual[a, 2.35e+17], x, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -3.7 \cdot 10^{-83}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -6.4 \cdot 10^{-158}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 3.15 \cdot 10^{-96}:\\
\;\;\;\;z \cdot y\\

\mathbf{elif}\;a \leq 2.35 \cdot 10^{+17}:\\
\;\;\;\;x\\

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


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

    1. Initial program 90.2%

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

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*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 inf 61.7%

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

    if -2.85000000000000017e81 < a < -3.69999999999999995e-83 or 2.35e17 < a

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

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

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

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

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

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

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

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

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

    if -3.69999999999999995e-83 < a < -6.39999999999999993e-158 or 3.1499999999999998e-96 < a < 2.35e17

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

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

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

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

    if -6.39999999999999993e-158 < a < 3.1499999999999998e-96

    1. Initial program 98.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.85 \cdot 10^{+81}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;a \leq -3.7 \cdot 10^{-83}:\\ \;\;\;\;z \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;a \leq -6.4 \cdot 10^{-158}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.15 \cdot 10^{-96}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;a \leq 2.35 \cdot 10^{+17}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 60.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + z \cdot y\\
t_2 := x + a \cdot t\\
\mathbf{if}\;a \leq -1.8 \cdot 10^{+87}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 3.5 \cdot 10^{+67}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 2.3 \cdot 10^{+102}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\

\mathbf{elif}\;a \leq 2.2 \cdot 10^{+130}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.28 \cdot 10^{+219}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.79999999999999997e87 or 2.19999999999999993e130 < a < 1.27999999999999995e219

    1. Initial program 93.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+93.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*96.7%

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

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

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

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

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

    if -1.79999999999999997e87 < a < 3.5e67 or 2.2999999999999999e102 < a < 2.19999999999999993e130

    1. Initial program 95.1%

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

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

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

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

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

    if 3.5e67 < a < 2.2999999999999999e102

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define99.8%

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

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

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

    if 1.27999999999999995e219 < a

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{+87}:\\ \;\;\;\;x + a \cdot t\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+67}:\\ \;\;\;\;x + z \cdot y\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+102}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{+130}:\\ \;\;\;\;x + z \cdot y\\ \mathbf{elif}\;a \leq 1.28 \cdot 10^{+219}:\\ \;\;\;\;x + a \cdot t\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 84.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -1.25 \cdot 10^{-109}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 9 \cdot 10^{+128}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.0499999999999999e86 or 9.0000000000000003e128 < a

    1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-out97.5%

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

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

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

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

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

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

    if -1.0499999999999999e86 < a < -1.25000000000000005e-109 or 1.19999999999999999e27 < a < 9.0000000000000003e128

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

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

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

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

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

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

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

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

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

    if -1.25000000000000005e-109 < a < 1.19999999999999999e27

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.05 \cdot 10^{+86}:\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-109}:\\ \;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+27}:\\ \;\;\;\;x + \left(z \cdot y + a \cdot t\right)\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+128}:\\ \;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 83.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -1.55 \cdot 10^{-109}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.1 \cdot 10^{+129}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 92.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+92.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000004e90 < a < -1.55e-109 or 1.8499999999999999e25 < a < 1.1e129

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

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

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

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

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

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

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

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

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

    if -1.55e-109 < a < 1.8499999999999999e25

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

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

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

    if 1.1e129 < a

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{b \cdot z}\right)\right)\right) \]
      15. remove-double-neg93.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5 \cdot 10^{+90}:\\ \;\;\;\;z \cdot y + a \cdot \left(t + z \cdot b\right)\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-109}:\\ \;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{+25}:\\ \;\;\;\;x + \left(z \cdot y + a \cdot t\right)\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{+129}:\\ \;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 57.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := x + z \cdot y\\
\mathbf{if}\;a \leq -3.8 \cdot 10^{+92}:\\
\;\;\;\;a \cdot t\\

\mathbf{elif}\;a \leq 3.2 \cdot 10^{+69}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 5.2 \cdot 10^{+103}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\

\mathbf{elif}\;a \leq 1.1 \cdot 10^{+150}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 92.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+92.0%

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

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

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

    if -3.8e92 < a < 3.19999999999999985e69 or 5.2000000000000003e103 < a < 1.1e150

    1. Initial program 95.1%

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

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

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

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

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

    if 3.19999999999999985e69 < a < 5.2000000000000003e103

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-define99.8%

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

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

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

    if 1.1e150 < a

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{+92}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+69}:\\ \;\;\;\;x + z \cdot y\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{+103}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{+150}:\\ \;\;\;\;x + z \cdot y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 73.4% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -3.9 \cdot 10^{-69}:\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.3000000000000002e88 or 4.7e14 < a

    1. Initial program 88.9%

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

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

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

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

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

    if -2.3000000000000002e88 < a < -3.89999999999999981e-69

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

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

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

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

    if -3.89999999999999981e-69 < a < 4.7e14

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{+88}:\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \mathbf{elif}\;a \leq -3.9 \cdot 10^{-69}:\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \mathbf{elif}\;a \leq 4.7 \cdot 10^{+14}:\\ \;\;\;\;x + z \cdot y\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 93.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq 6 \cdot 10^{+168}:\\
\;\;\;\;\left(x + z \cdot y\right) + \left(a \cdot t + a \cdot \left(z \cdot b\right)\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 z < 5.9999999999999996e168

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

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

    if 5.9999999999999996e168 < z

    1. Initial program 77.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+77.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*77.8%

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

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

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

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

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

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

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

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

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

Alternative 10: 82.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{-145} \lor \neg \left(a \leq 5.2 \cdot 10^{-81}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.8000000000000002e-145 or 5.1999999999999998e-81 < a

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. remove-double-neg95.9%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-out95.9%

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{b \cdot z}\right)\right)\right) \]
      15. remove-double-neg95.9%

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

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

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

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

    if -3.8000000000000002e-145 < a < 5.1999999999999998e-81

    1. Initial program 98.9%

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

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

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

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

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

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

Alternative 11: 87.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.6 \cdot 10^{-68} \lor \neg \left(a \leq 1.3 \cdot 10^{-38}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.60000000000000007e-68 or 1.30000000000000005e-38 < a

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-out95.3%

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

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

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

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

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

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

    if -3.60000000000000007e-68 < a < 1.30000000000000005e-38

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

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

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

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

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

Alternative 12: 37.4% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;a \leq 1.32 \cdot 10^{+129}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.2e86 or 1.32e129 < a

    1. Initial program 89.2%

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

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

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

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

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

    if -1.2e86 < a < 8.1999999999999995e-95

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

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

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

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

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

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

    if 8.1999999999999995e-95 < a < 1.32e129

    1. Initial program 92.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+92.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*98.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{+86}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-95}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;a \leq 1.32 \cdot 10^{+129}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;a \cdot t\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 74.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -8 \cdot 10^{+38} \lor \neg \left(a \leq 650000000000\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.99999999999999982e38 or 6.5e11 < a

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

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

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

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

    if -7.99999999999999982e38 < a < 6.5e11

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

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

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

Alternative 14: 36.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.8 \cdot 10^{+68} \lor \neg \left(a \leq 9 \cdot 10^{+128}\right):\\
\;\;\;\;a \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.80000000000000016e68 or 9.0000000000000003e128 < a

    1. Initial program 87.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+87.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*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 t around inf 53.9%

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

    if -4.80000000000000016e68 < a < 9.0000000000000003e128

    1. Initial program 95.8%

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

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. associate-*l*94.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 x around inf 32.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.8 \cdot 10^{+68} \lor \neg \left(a \leq 9 \cdot 10^{+128}\right):\\ \;\;\;\;a \cdot t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 24.9% 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 93.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+93.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.8%

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

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

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 97.4% 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 2024026 
(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)))