Linear.V4:$cdot from linear-1.19.1.3, C

Percentage Accurate: 95.9% → 98.1%
Time: 6.7s
Alternatives: 10
Speedup: 1.3×

Specification

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

\\
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\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 10 alternatives:

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

Initial Program: 95.9% accurate, 1.0× speedup?

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

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

Alternative 1: 98.1% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{fma}\left(i, c, b \cdot a\right)\right)\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (fma z t (fma y x (fma i c (* b a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return fma(z, t, fma(y, x, fma(i, c, (b * a))));
}
function code(x, y, z, t, a, b, c, i)
	return fma(z, t, fma(y, x, fma(i, c, Float64(b * a))))
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(z * t + N[(y * x + N[(i * c + N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{fma}\left(i, c, b \cdot a\right)\right)\right)
\end{array}
Derivation
  1. Initial program 94.1%

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

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

      \[\leadsto \color{blue}{\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right)} + c \cdot i \]
    3. associate-+l+N/A

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

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

      \[\leadsto \color{blue}{\left(z \cdot t + x \cdot y\right)} + \left(a \cdot b + c \cdot i\right) \]
    6. associate-+l+N/A

      \[\leadsto \color{blue}{z \cdot t + \left(x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
    7. lift-*.f64N/A

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z, t, x \cdot y + \left(a \cdot b + c \cdot i\right)\right)} \]
    9. lift-*.f64N/A

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

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

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

      \[\leadsto \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \color{blue}{c \cdot i + a \cdot b}\right)\right) \]
    13. lift-*.f64N/A

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

      \[\leadsto \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \color{blue}{i \cdot c} + a \cdot b\right)\right) \]
    15. lower-fma.f6497.2

      \[\leadsto \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(i, c, a \cdot b\right)}\right)\right) \]
    16. lift-*.f64N/A

      \[\leadsto \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{fma}\left(i, c, \color{blue}{a \cdot b}\right)\right)\right) \]
    17. *-commutativeN/A

      \[\leadsto \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{fma}\left(i, c, \color{blue}{b \cdot a}\right)\right)\right) \]
    18. lower-*.f6497.2

      \[\leadsto \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{fma}\left(i, c, \color{blue}{b \cdot a}\right)\right)\right) \]
  4. Applied rewrites97.2%

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

Alternative 2: 43.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot t \leq -5 \cdot 10^{+150}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;z \cdot t \leq -3 \cdot 10^{-72}:\\ \;\;\;\;i \cdot c\\ \mathbf{elif}\;z \cdot t \leq 10^{-61}:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;z \cdot t \leq 1.6 \cdot 10^{+71}:\\ \;\;\;\;i \cdot c\\ \mathbf{else}:\\ \;\;\;\;t \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= (* z t) -5e+150)
   (* t z)
   (if (<= (* z t) -3e-72)
     (* i c)
     (if (<= (* z t) 1e-61)
       (* b a)
       (if (<= (* z t) 1.6e+71) (* i c) (* t z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((z * t) <= -5e+150) {
		tmp = t * z;
	} else if ((z * t) <= -3e-72) {
		tmp = i * c;
	} else if ((z * t) <= 1e-61) {
		tmp = b * a;
	} else if ((z * t) <= 1.6e+71) {
		tmp = i * c;
	} else {
		tmp = t * z;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if ((z * t) <= (-5d+150)) then
        tmp = t * z
    else if ((z * t) <= (-3d-72)) then
        tmp = i * c
    else if ((z * t) <= 1d-61) then
        tmp = b * a
    else if ((z * t) <= 1.6d+71) then
        tmp = i * c
    else
        tmp = t * z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((z * t) <= -5e+150) {
		tmp = t * z;
	} else if ((z * t) <= -3e-72) {
		tmp = i * c;
	} else if ((z * t) <= 1e-61) {
		tmp = b * a;
	} else if ((z * t) <= 1.6e+71) {
		tmp = i * c;
	} else {
		tmp = t * z;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (z * t) <= -5e+150:
		tmp = t * z
	elif (z * t) <= -3e-72:
		tmp = i * c
	elif (z * t) <= 1e-61:
		tmp = b * a
	elif (z * t) <= 1.6e+71:
		tmp = i * c
	else:
		tmp = t * z
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(z * t) <= -5e+150)
		tmp = Float64(t * z);
	elseif (Float64(z * t) <= -3e-72)
		tmp = Float64(i * c);
	elseif (Float64(z * t) <= 1e-61)
		tmp = Float64(b * a);
	elseif (Float64(z * t) <= 1.6e+71)
		tmp = Float64(i * c);
	else
		tmp = Float64(t * z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((z * t) <= -5e+150)
		tmp = t * z;
	elseif ((z * t) <= -3e-72)
		tmp = i * c;
	elseif ((z * t) <= 1e-61)
		tmp = b * a;
	elseif ((z * t) <= 1.6e+71)
		tmp = i * c;
	else
		tmp = t * z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(z * t), $MachinePrecision], -5e+150], N[(t * z), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], -3e-72], N[(i * c), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 1e-61], N[(b * a), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 1.6e+71], N[(i * c), $MachinePrecision], N[(t * z), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -5 \cdot 10^{+150}:\\
\;\;\;\;t \cdot z\\

\mathbf{elif}\;z \cdot t \leq -3 \cdot 10^{-72}:\\
\;\;\;\;i \cdot c\\

\mathbf{elif}\;z \cdot t \leq 10^{-61}:\\
\;\;\;\;b \cdot a\\

\mathbf{elif}\;z \cdot t \leq 1.6 \cdot 10^{+71}:\\
\;\;\;\;i \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 z t) < -5.00000000000000009e150 or 1.60000000000000012e71 < (*.f64 z t)

    1. Initial program 88.7%

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

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + t \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{b \cdot a} + \left(c \cdot i + t \cdot z\right) \]
      2. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, c \cdot i + t \cdot z\right)} \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + t \cdot z\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, t \cdot z\right)}\right) \]
      5. lower-*.f6487.7

        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
    5. Applied rewrites87.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)} \]
    6. Taylor expanded in c around 0

      \[\leadsto a \cdot b + \color{blue}{t \cdot z} \]
    7. Step-by-step derivation
      1. Applied rewrites79.3%

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

        \[\leadsto a \cdot b \]
      3. Step-by-step derivation
        1. Applied rewrites17.4%

          \[\leadsto b \cdot a \]
        2. Taylor expanded in z around inf

          \[\leadsto \color{blue}{t \cdot z} \]
        3. Step-by-step derivation
          1. lower-*.f6472.1

            \[\leadsto \color{blue}{t \cdot z} \]
        4. Applied rewrites72.1%

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

        if -5.00000000000000009e150 < (*.f64 z t) < -3e-72 or 1e-61 < (*.f64 z t) < 1.60000000000000012e71

        1. Initial program 96.8%

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

          \[\leadsto \color{blue}{c \cdot i} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{i \cdot c} \]
          2. lower-*.f6442.4

            \[\leadsto \color{blue}{i \cdot c} \]
        5. Applied rewrites42.4%

          \[\leadsto \color{blue}{i \cdot c} \]

        if -3e-72 < (*.f64 z t) < 1e-61

        1. Initial program 96.4%

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

          \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + t \cdot z\right)} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{b \cdot a} + \left(c \cdot i + t \cdot z\right) \]
          2. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, c \cdot i + t \cdot z\right)} \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + t \cdot z\right) \]
          4. lower-fma.f64N/A

            \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, t \cdot z\right)}\right) \]
          5. lower-*.f6465.9

            \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
        5. Applied rewrites65.9%

          \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)} \]
        6. Taylor expanded in c around 0

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

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

            \[\leadsto a \cdot b \]
          3. Step-by-step derivation
            1. Applied rewrites42.3%

              \[\leadsto b \cdot a \]
          4. Recombined 3 regimes into one program.
          5. Add Preprocessing

          Alternative 3: 62.3% accurate, 0.7× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+132}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-263}:\\ \;\;\;\;\mathsf{fma}\left(b, a, c \cdot i\right)\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{+146}:\\ \;\;\;\;\mathsf{fma}\left(a, b, t \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \end{array} \]
          (FPCore (x y z t a b c i)
           :precision binary64
           (if (<= (* x y) -5e+132)
             (* y x)
             (if (<= (* x y) -1e-263)
               (fma b a (* c i))
               (if (<= (* x y) 2e+146) (fma a b (* t z)) (* y x)))))
          double code(double x, double y, double z, double t, double a, double b, double c, double i) {
          	double tmp;
          	if ((x * y) <= -5e+132) {
          		tmp = y * x;
          	} else if ((x * y) <= -1e-263) {
          		tmp = fma(b, a, (c * i));
          	} else if ((x * y) <= 2e+146) {
          		tmp = fma(a, b, (t * z));
          	} else {
          		tmp = y * x;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b, c, i)
          	tmp = 0.0
          	if (Float64(x * y) <= -5e+132)
          		tmp = Float64(y * x);
          	elseif (Float64(x * y) <= -1e-263)
          		tmp = fma(b, a, Float64(c * i));
          	elseif (Float64(x * y) <= 2e+146)
          		tmp = fma(a, b, Float64(t * z));
          	else
          		tmp = Float64(y * x);
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -5e+132], N[(y * x), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1e-263], N[(b * a + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e+146], N[(a * b + N[(t * z), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+132}:\\
          \;\;\;\;y \cdot x\\
          
          \mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-263}:\\
          \;\;\;\;\mathsf{fma}\left(b, a, c \cdot i\right)\\
          
          \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{+146}:\\
          \;\;\;\;\mathsf{fma}\left(a, b, t \cdot z\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;y \cdot x\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (*.f64 x y) < -5.0000000000000001e132 or 1.99999999999999987e146 < (*.f64 x y)

            1. Initial program 87.7%

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

              \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + t \cdot z\right)} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \color{blue}{b \cdot a} + \left(c \cdot i + t \cdot z\right) \]
              2. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, c \cdot i + t \cdot z\right)} \]
              3. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + t \cdot z\right) \]
              4. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, t \cdot z\right)}\right) \]
              5. lower-*.f6430.3

                \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
            5. Applied rewrites30.3%

              \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)} \]
            6. Taylor expanded in c around 0

              \[\leadsto a \cdot b + \color{blue}{t \cdot z} \]
            7. Step-by-step derivation
              1. Applied rewrites22.0%

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

                \[\leadsto \color{blue}{x \cdot y} \]
              3. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \color{blue}{y \cdot x} \]
                2. lower-*.f6476.5

                  \[\leadsto \color{blue}{y \cdot x} \]
              4. Applied rewrites76.5%

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

              if -5.0000000000000001e132 < (*.f64 x y) < -1e-263

              1. Initial program 94.8%

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

                \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, c \cdot i + x \cdot y\right)} \]
                3. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + x \cdot y\right) \]
                4. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, x \cdot y\right)}\right) \]
                5. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{y \cdot x}\right)\right) \]
                6. lower-*.f6476.7

                  \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{y \cdot x}\right)\right) \]
              5. Applied rewrites76.7%

                \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, y \cdot x\right)\right)} \]
              6. Taylor expanded in x around 0

                \[\leadsto \mathsf{fma}\left(b, a, c \cdot i\right) \]
              7. Step-by-step derivation
                1. Applied rewrites69.2%

                  \[\leadsto \mathsf{fma}\left(b, a, c \cdot i\right) \]

                if -1e-263 < (*.f64 x y) < 1.99999999999999987e146

                1. Initial program 97.4%

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

                  \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + t \cdot z\right)} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \color{blue}{b \cdot a} + \left(c \cdot i + t \cdot z\right) \]
                  2. lower-fma.f64N/A

                    \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, c \cdot i + t \cdot z\right)} \]
                  3. *-commutativeN/A

                    \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + t \cdot z\right) \]
                  4. lower-fma.f64N/A

                    \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, t \cdot z\right)}\right) \]
                  5. lower-*.f6491.5

                    \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
                5. Applied rewrites91.5%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)} \]
                6. Taylor expanded in c around 0

                  \[\leadsto a \cdot b + \color{blue}{t \cdot z} \]
                7. Step-by-step derivation
                  1. Applied rewrites67.8%

                    \[\leadsto \mathsf{fma}\left(a, \color{blue}{b}, t \cdot z\right) \]
                8. Recombined 3 regimes into one program.
                9. Add Preprocessing

                Alternative 4: 89.4% accurate, 0.7× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+70} \lor \neg \left(z \cdot t \leq 2 \cdot 10^{+70}\right):\\ \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, y \cdot x\right)\right)\\ \end{array} \end{array} \]
                (FPCore (x y z t a b c i)
                 :precision binary64
                 (if (or (<= (* z t) -2e+70) (not (<= (* z t) 2e+70)))
                   (fma b a (fma i c (* t z)))
                   (fma b a (fma i c (* y x)))))
                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                	double tmp;
                	if (((z * t) <= -2e+70) || !((z * t) <= 2e+70)) {
                		tmp = fma(b, a, fma(i, c, (t * z)));
                	} else {
                		tmp = fma(b, a, fma(i, c, (y * x)));
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a, b, c, i)
                	tmp = 0.0
                	if ((Float64(z * t) <= -2e+70) || !(Float64(z * t) <= 2e+70))
                		tmp = fma(b, a, fma(i, c, Float64(t * z)));
                	else
                		tmp = fma(b, a, fma(i, c, Float64(y * x)));
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(z * t), $MachinePrecision], -2e+70], N[Not[LessEqual[N[(z * t), $MachinePrecision], 2e+70]], $MachinePrecision]], N[(b * a + N[(i * c + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * a + N[(i * c + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+70} \lor \neg \left(z \cdot t \leq 2 \cdot 10^{+70}\right):\\
                \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, y \cdot x\right)\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (*.f64 z t) < -2.00000000000000015e70 or 2.00000000000000015e70 < (*.f64 z t)

                  1. Initial program 88.9%

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

                    \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + t \cdot z\right)} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \color{blue}{b \cdot a} + \left(c \cdot i + t \cdot z\right) \]
                    2. lower-fma.f64N/A

                      \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, c \cdot i + t \cdot z\right)} \]
                    3. *-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + t \cdot z\right) \]
                    4. lower-fma.f64N/A

                      \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, t \cdot z\right)}\right) \]
                    5. lower-*.f6488.1

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)} \]

                  if -2.00000000000000015e70 < (*.f64 z t) < 2.00000000000000015e70

                  1. Initial program 97.0%

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

                    \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, c \cdot i + x \cdot y\right)} \]
                    3. *-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + x \cdot y\right) \]
                    4. lower-fma.f64N/A

                      \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, x \cdot y\right)}\right) \]
                    5. *-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{y \cdot x}\right)\right) \]
                    6. lower-*.f6494.4

                      \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{y \cdot x}\right)\right) \]
                  5. Applied rewrites94.4%

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

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

                Alternative 5: 83.5% accurate, 0.7× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+132} \lor \neg \left(x \cdot y \leq 4 \cdot 10^{+230}\right):\\ \;\;\;\;y \cdot x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)\\ \end{array} \end{array} \]
                (FPCore (x y z t a b c i)
                 :precision binary64
                 (if (or (<= (* x y) -5e+132) (not (<= (* x y) 4e+230)))
                   (* y x)
                   (fma b a (fma i c (* t z)))))
                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                	double tmp;
                	if (((x * y) <= -5e+132) || !((x * y) <= 4e+230)) {
                		tmp = y * x;
                	} else {
                		tmp = fma(b, a, fma(i, c, (t * z)));
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a, b, c, i)
                	tmp = 0.0
                	if ((Float64(x * y) <= -5e+132) || !(Float64(x * y) <= 4e+230))
                		tmp = Float64(y * x);
                	else
                		tmp = fma(b, a, fma(i, c, Float64(t * z)));
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -5e+132], N[Not[LessEqual[N[(x * y), $MachinePrecision], 4e+230]], $MachinePrecision]], N[(y * x), $MachinePrecision], N[(b * a + N[(i * c + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+132} \lor \neg \left(x \cdot y \leq 4 \cdot 10^{+230}\right):\\
                \;\;\;\;y \cdot x\\
                
                \mathbf{else}:\\
                \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (*.f64 x y) < -5.0000000000000001e132 or 4.0000000000000004e230 < (*.f64 x y)

                  1. Initial program 88.1%

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

                    \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + t \cdot z\right)} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \color{blue}{b \cdot a} + \left(c \cdot i + t \cdot z\right) \]
                    2. lower-fma.f64N/A

                      \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, c \cdot i + t \cdot z\right)} \]
                    3. *-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + t \cdot z\right) \]
                    4. lower-fma.f64N/A

                      \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, t \cdot z\right)}\right) \]
                    5. lower-*.f6426.5

                      \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
                  5. Applied rewrites26.5%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)} \]
                  6. Taylor expanded in c around 0

                    \[\leadsto a \cdot b + \color{blue}{t \cdot z} \]
                  7. Step-by-step derivation
                    1. Applied rewrites20.6%

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

                      \[\leadsto \color{blue}{x \cdot y} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \color{blue}{y \cdot x} \]
                      2. lower-*.f6480.7

                        \[\leadsto \color{blue}{y \cdot x} \]
                    4. Applied rewrites80.7%

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

                    if -5.0000000000000001e132 < (*.f64 x y) < 4.0000000000000004e230

                    1. Initial program 95.9%

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

                      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + t \cdot z\right)} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \color{blue}{b \cdot a} + \left(c \cdot i + t \cdot z\right) \]
                      2. lower-fma.f64N/A

                        \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, c \cdot i + t \cdot z\right)} \]
                      3. *-commutativeN/A

                        \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + t \cdot z\right) \]
                      4. lower-fma.f64N/A

                        \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, t \cdot z\right)}\right) \]
                      5. lower-*.f6489.6

                        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
                    5. Applied rewrites89.6%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)} \]
                  8. Recombined 2 regimes into one program.
                  9. Final simplification87.6%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+132} \lor \neg \left(x \cdot y \leq 4 \cdot 10^{+230}\right):\\ \;\;\;\;y \cdot x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)\\ \end{array} \]
                  10. Add Preprocessing

                  Alternative 6: 89.5% accurate, 0.7× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot t \leq -1 \cdot 10^{+26}:\\ \;\;\;\;\mathsf{fma}\left(i, c, \mathsf{fma}\left(t, z, y \cdot x\right)\right)\\ \mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+70}:\\ \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, y \cdot x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b c i)
                   :precision binary64
                   (if (<= (* z t) -1e+26)
                     (fma i c (fma t z (* y x)))
                     (if (<= (* z t) 2e+70)
                       (fma b a (fma i c (* y x)))
                       (fma b a (fma i c (* t z))))))
                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double tmp;
                  	if ((z * t) <= -1e+26) {
                  		tmp = fma(i, c, fma(t, z, (y * x)));
                  	} else if ((z * t) <= 2e+70) {
                  		tmp = fma(b, a, fma(i, c, (y * x)));
                  	} else {
                  		tmp = fma(b, a, fma(i, c, (t * z)));
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a, b, c, i)
                  	tmp = 0.0
                  	if (Float64(z * t) <= -1e+26)
                  		tmp = fma(i, c, fma(t, z, Float64(y * x)));
                  	elseif (Float64(z * t) <= 2e+70)
                  		tmp = fma(b, a, fma(i, c, Float64(y * x)));
                  	else
                  		tmp = fma(b, a, fma(i, c, Float64(t * z)));
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(z * t), $MachinePrecision], -1e+26], N[(i * c + N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 2e+70], N[(b * a + N[(i * c + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * a + N[(i * c + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;z \cdot t \leq -1 \cdot 10^{+26}:\\
                  \;\;\;\;\mathsf{fma}\left(i, c, \mathsf{fma}\left(t, z, y \cdot x\right)\right)\\
                  
                  \mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+70}:\\
                  \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, y \cdot x\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if (*.f64 z t) < -1.00000000000000005e26

                    1. Initial program 90.7%

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

                      \[\leadsto \color{blue}{c \cdot i + \left(t \cdot z + x \cdot y\right)} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

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

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

                        \[\leadsto \mathsf{fma}\left(i, c, \color{blue}{\mathsf{fma}\left(t, z, x \cdot y\right)}\right) \]
                      4. *-commutativeN/A

                        \[\leadsto \mathsf{fma}\left(i, c, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                      5. lower-*.f6491.0

                        \[\leadsto \mathsf{fma}\left(i, c, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                    5. Applied rewrites91.0%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, \mathsf{fma}\left(t, z, y \cdot x\right)\right)} \]

                    if -1.00000000000000005e26 < (*.f64 z t) < 2.00000000000000015e70

                    1. Initial program 96.8%

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

                      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

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

                        \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, c \cdot i + x \cdot y\right)} \]
                      3. *-commutativeN/A

                        \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + x \cdot y\right) \]
                      4. lower-fma.f64N/A

                        \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, x \cdot y\right)}\right) \]
                      5. *-commutativeN/A

                        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{y \cdot x}\right)\right) \]
                      6. lower-*.f6495.4

                        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{y \cdot x}\right)\right) \]
                    5. Applied rewrites95.4%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, y \cdot x\right)\right)} \]

                    if 2.00000000000000015e70 < (*.f64 z t)

                    1. Initial program 88.9%

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

                      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + t \cdot z\right)} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \color{blue}{b \cdot a} + \left(c \cdot i + t \cdot z\right) \]
                      2. lower-fma.f64N/A

                        \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, c \cdot i + t \cdot z\right)} \]
                      3. *-commutativeN/A

                        \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + t \cdot z\right) \]
                      4. lower-fma.f64N/A

                        \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, t \cdot z\right)}\right) \]
                      5. lower-*.f6486.7

                        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
                    5. Applied rewrites86.7%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)} \]
                  3. Recombined 3 regimes into one program.
                  4. Add Preprocessing

                  Alternative 7: 63.1% accurate, 0.9× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+132} \lor \neg \left(x \cdot y \leq 2 \cdot 10^{+146}\right):\\ \;\;\;\;y \cdot x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, b, t \cdot z\right)\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b c i)
                   :precision binary64
                   (if (or (<= (* x y) -5e+132) (not (<= (* x y) 2e+146)))
                     (* y x)
                     (fma a b (* t z))))
                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double tmp;
                  	if (((x * y) <= -5e+132) || !((x * y) <= 2e+146)) {
                  		tmp = y * x;
                  	} else {
                  		tmp = fma(a, b, (t * z));
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a, b, c, i)
                  	tmp = 0.0
                  	if ((Float64(x * y) <= -5e+132) || !(Float64(x * y) <= 2e+146))
                  		tmp = Float64(y * x);
                  	else
                  		tmp = fma(a, b, Float64(t * z));
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -5e+132], N[Not[LessEqual[N[(x * y), $MachinePrecision], 2e+146]], $MachinePrecision]], N[(y * x), $MachinePrecision], N[(a * b + N[(t * z), $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+132} \lor \neg \left(x \cdot y \leq 2 \cdot 10^{+146}\right):\\
                  \;\;\;\;y \cdot x\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\mathsf{fma}\left(a, b, t \cdot z\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (*.f64 x y) < -5.0000000000000001e132 or 1.99999999999999987e146 < (*.f64 x y)

                    1. Initial program 87.7%

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

                      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + t \cdot z\right)} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \color{blue}{b \cdot a} + \left(c \cdot i + t \cdot z\right) \]
                      2. lower-fma.f64N/A

                        \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, c \cdot i + t \cdot z\right)} \]
                      3. *-commutativeN/A

                        \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + t \cdot z\right) \]
                      4. lower-fma.f64N/A

                        \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, t \cdot z\right)}\right) \]
                      5. lower-*.f6430.3

                        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
                    5. Applied rewrites30.3%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)} \]
                    6. Taylor expanded in c around 0

                      \[\leadsto a \cdot b + \color{blue}{t \cdot z} \]
                    7. Step-by-step derivation
                      1. Applied rewrites22.0%

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

                        \[\leadsto \color{blue}{x \cdot y} \]
                      3. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \color{blue}{y \cdot x} \]
                        2. lower-*.f6476.5

                          \[\leadsto \color{blue}{y \cdot x} \]
                      4. Applied rewrites76.5%

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

                      if -5.0000000000000001e132 < (*.f64 x y) < 1.99999999999999987e146

                      1. Initial program 96.3%

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

                        \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + t \cdot z\right)} \]
                      4. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \color{blue}{b \cdot a} + \left(c \cdot i + t \cdot z\right) \]
                        2. lower-fma.f64N/A

                          \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, c \cdot i + t \cdot z\right)} \]
                        3. *-commutativeN/A

                          \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + t \cdot z\right) \]
                        4. lower-fma.f64N/A

                          \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, t \cdot z\right)}\right) \]
                        5. lower-*.f6490.3

                          \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
                      5. Applied rewrites90.3%

                        \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)} \]
                      6. Taylor expanded in c around 0

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

                          \[\leadsto \mathsf{fma}\left(a, \color{blue}{b}, t \cdot z\right) \]
                      8. Recombined 2 regimes into one program.
                      9. Final simplification66.5%

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

                      Alternative 8: 66.4% accurate, 0.9× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+22}:\\ \;\;\;\;\mathsf{fma}\left(i, c, t \cdot z\right)\\ \mathbf{elif}\;z \cdot t \leq 1.6 \cdot 10^{+71}:\\ \;\;\;\;\mathsf{fma}\left(b, a, c \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, b, t \cdot z\right)\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (if (<= (* z t) -2e+22)
                         (fma i c (* t z))
                         (if (<= (* z t) 1.6e+71) (fma b a (* c i)) (fma a b (* t z)))))
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double tmp;
                      	if ((z * t) <= -2e+22) {
                      		tmp = fma(i, c, (t * z));
                      	} else if ((z * t) <= 1.6e+71) {
                      		tmp = fma(b, a, (c * i));
                      	} else {
                      		tmp = fma(a, b, (t * z));
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a, b, c, i)
                      	tmp = 0.0
                      	if (Float64(z * t) <= -2e+22)
                      		tmp = fma(i, c, Float64(t * z));
                      	elseif (Float64(z * t) <= 1.6e+71)
                      		tmp = fma(b, a, Float64(c * i));
                      	else
                      		tmp = fma(a, b, Float64(t * z));
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(z * t), $MachinePrecision], -2e+22], N[(i * c + N[(t * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 1.6e+71], N[(b * a + N[(c * i), $MachinePrecision]), $MachinePrecision], N[(a * b + N[(t * z), $MachinePrecision]), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+22}:\\
                      \;\;\;\;\mathsf{fma}\left(i, c, t \cdot z\right)\\
                      
                      \mathbf{elif}\;z \cdot t \leq 1.6 \cdot 10^{+71}:\\
                      \;\;\;\;\mathsf{fma}\left(b, a, c \cdot i\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\mathsf{fma}\left(a, b, t \cdot z\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if (*.f64 z t) < -2e22

                        1. Initial program 91.1%

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

                          \[\leadsto \color{blue}{c \cdot i + \left(t \cdot z + x \cdot y\right)} \]
                        4. Step-by-step derivation
                          1. *-commutativeN/A

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

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

                            \[\leadsto \mathsf{fma}\left(i, c, \color{blue}{\mathsf{fma}\left(t, z, x \cdot y\right)}\right) \]
                          4. *-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(i, c, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                          5. lower-*.f6491.3

                            \[\leadsto \mathsf{fma}\left(i, c, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                        5. Applied rewrites91.3%

                          \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, \mathsf{fma}\left(t, z, y \cdot x\right)\right)} \]
                        6. Taylor expanded in x around 0

                          \[\leadsto \mathsf{fma}\left(i, c, t \cdot z\right) \]
                        7. Step-by-step derivation
                          1. Applied rewrites77.8%

                            \[\leadsto \mathsf{fma}\left(i, c, t \cdot z\right) \]

                          if -2e22 < (*.f64 z t) < 1.60000000000000012e71

                          1. Initial program 96.8%

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

                            \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
                          4. Step-by-step derivation
                            1. *-commutativeN/A

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

                              \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, c \cdot i + x \cdot y\right)} \]
                            3. *-commutativeN/A

                              \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + x \cdot y\right) \]
                            4. lower-fma.f64N/A

                              \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, x \cdot y\right)}\right) \]
                            5. *-commutativeN/A

                              \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{y \cdot x}\right)\right) \]
                            6. lower-*.f6495.3

                              \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{y \cdot x}\right)\right) \]
                          5. Applied rewrites95.3%

                            \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, y \cdot x\right)\right)} \]
                          6. Taylor expanded in x around 0

                            \[\leadsto \mathsf{fma}\left(b, a, c \cdot i\right) \]
                          7. Step-by-step derivation
                            1. Applied rewrites66.2%

                              \[\leadsto \mathsf{fma}\left(b, a, c \cdot i\right) \]

                            if 1.60000000000000012e71 < (*.f64 z t)

                            1. Initial program 88.6%

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

                              \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + t \cdot z\right)} \]
                            4. Step-by-step derivation
                              1. *-commutativeN/A

                                \[\leadsto \color{blue}{b \cdot a} + \left(c \cdot i + t \cdot z\right) \]
                              2. lower-fma.f64N/A

                                \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, c \cdot i + t \cdot z\right)} \]
                              3. *-commutativeN/A

                                \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + t \cdot z\right) \]
                              4. lower-fma.f64N/A

                                \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, t \cdot z\right)}\right) \]
                              5. lower-*.f6486.4

                                \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
                            5. Applied rewrites86.4%

                              \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)} \]
                            6. Taylor expanded in c around 0

                              \[\leadsto a \cdot b + \color{blue}{t \cdot z} \]
                            7. Step-by-step derivation
                              1. Applied rewrites79.9%

                                \[\leadsto \mathsf{fma}\left(a, \color{blue}{b}, t \cdot z\right) \]
                            8. Recombined 3 regimes into one program.
                            9. Add Preprocessing

                            Alternative 9: 43.4% accurate, 1.1× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+115} \lor \neg \left(a \cdot b \leq 10^{+95}\right):\\ \;\;\;\;b \cdot a\\ \mathbf{else}:\\ \;\;\;\;i \cdot c\\ \end{array} \end{array} \]
                            (FPCore (x y z t a b c i)
                             :precision binary64
                             (if (or (<= (* a b) -5e+115) (not (<= (* a b) 1e+95))) (* b a) (* i c)))
                            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                            	double tmp;
                            	if (((a * b) <= -5e+115) || !((a * b) <= 1e+95)) {
                            		tmp = b * a;
                            	} else {
                            		tmp = i * c;
                            	}
                            	return tmp;
                            }
                            
                            real(8) function code(x, y, z, t, a, b, c, i)
                                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), intent (in) :: c
                                real(8), intent (in) :: i
                                real(8) :: tmp
                                if (((a * b) <= (-5d+115)) .or. (.not. ((a * b) <= 1d+95))) then
                                    tmp = b * a
                                else
                                    tmp = i * c
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                            	double tmp;
                            	if (((a * b) <= -5e+115) || !((a * b) <= 1e+95)) {
                            		tmp = b * a;
                            	} else {
                            		tmp = i * c;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a, b, c, i):
                            	tmp = 0
                            	if ((a * b) <= -5e+115) or not ((a * b) <= 1e+95):
                            		tmp = b * a
                            	else:
                            		tmp = i * c
                            	return tmp
                            
                            function code(x, y, z, t, a, b, c, i)
                            	tmp = 0.0
                            	if ((Float64(a * b) <= -5e+115) || !(Float64(a * b) <= 1e+95))
                            		tmp = Float64(b * a);
                            	else
                            		tmp = Float64(i * c);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a, b, c, i)
                            	tmp = 0.0;
                            	if (((a * b) <= -5e+115) || ~(((a * b) <= 1e+95)))
                            		tmp = b * a;
                            	else
                            		tmp = i * c;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(a * b), $MachinePrecision], -5e+115], N[Not[LessEqual[N[(a * b), $MachinePrecision], 1e+95]], $MachinePrecision]], N[(b * a), $MachinePrecision], N[(i * c), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+115} \lor \neg \left(a \cdot b \leq 10^{+95}\right):\\
                            \;\;\;\;b \cdot a\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;i \cdot c\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if (*.f64 a b) < -5.00000000000000008e115 or 1.00000000000000002e95 < (*.f64 a b)

                              1. Initial program 87.8%

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

                                \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + t \cdot z\right)} \]
                              4. Step-by-step derivation
                                1. *-commutativeN/A

                                  \[\leadsto \color{blue}{b \cdot a} + \left(c \cdot i + t \cdot z\right) \]
                                2. lower-fma.f64N/A

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, c \cdot i + t \cdot z\right)} \]
                                3. *-commutativeN/A

                                  \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + t \cdot z\right) \]
                                4. lower-fma.f64N/A

                                  \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, t \cdot z\right)}\right) \]
                                5. lower-*.f6483.8

                                  \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
                              5. Applied rewrites83.8%

                                \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)} \]
                              6. Taylor expanded in c around 0

                                \[\leadsto a \cdot b + \color{blue}{t \cdot z} \]
                              7. Step-by-step derivation
                                1. Applied rewrites79.9%

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

                                  \[\leadsto a \cdot b \]
                                3. Step-by-step derivation
                                  1. Applied rewrites68.4%

                                    \[\leadsto b \cdot a \]

                                  if -5.00000000000000008e115 < (*.f64 a b) < 1.00000000000000002e95

                                  1. Initial program 97.6%

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

                                    \[\leadsto \color{blue}{c \cdot i} \]
                                  4. Step-by-step derivation
                                    1. *-commutativeN/A

                                      \[\leadsto \color{blue}{i \cdot c} \]
                                    2. lower-*.f6435.6

                                      \[\leadsto \color{blue}{i \cdot c} \]
                                  5. Applied rewrites35.6%

                                    \[\leadsto \color{blue}{i \cdot c} \]
                                4. Recombined 2 regimes into one program.
                                5. Final simplification47.1%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+115} \lor \neg \left(a \cdot b \leq 10^{+95}\right):\\ \;\;\;\;b \cdot a\\ \mathbf{else}:\\ \;\;\;\;i \cdot c\\ \end{array} \]
                                6. Add Preprocessing

                                Alternative 10: 27.4% accurate, 5.0× speedup?

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

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

                                  \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + t \cdot z\right)} \]
                                4. Step-by-step derivation
                                  1. *-commutativeN/A

                                    \[\leadsto \color{blue}{b \cdot a} + \left(c \cdot i + t \cdot z\right) \]
                                  2. lower-fma.f64N/A

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, c \cdot i + t \cdot z\right)} \]
                                  3. *-commutativeN/A

                                    \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{i \cdot c} + t \cdot z\right) \]
                                  4. lower-fma.f64N/A

                                    \[\leadsto \mathsf{fma}\left(b, a, \color{blue}{\mathsf{fma}\left(i, c, t \cdot z\right)}\right) \]
                                  5. lower-*.f6475.1

                                    \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
                                5. Applied rewrites75.1%

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, t \cdot z\right)\right)} \]
                                6. Taylor expanded in c around 0

                                  \[\leadsto a \cdot b + \color{blue}{t \cdot z} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites52.6%

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

                                    \[\leadsto a \cdot b \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites29.6%

                                      \[\leadsto b \cdot a \]
                                    2. Add Preprocessing

                                    Reproduce

                                    ?
                                    herbie shell --seed 2024317 
                                    (FPCore (x y z t a b c i)
                                      :name "Linear.V4:$cdot from linear-1.19.1.3, C"
                                      :precision binary64
                                      (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))