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

Percentage Accurate: 95.9% → 98.0%
Time: 8.6s
Alternatives: 16
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 16 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.0% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{fma}\left(i, c, a \cdot b\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 (* a b)))))
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, (a * b))));
}
function code(x, y, z, t, a, b, c, i)
	return fma(z, t, fma(y, x, fma(i, c, Float64(a * b))))
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(z * t + N[(y * x + N[(i * c + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(z, t, \mathsf{fma}\left(y, x, \mathsf{fma}\left(i, c, a \cdot b\right)\right)\right)
\end{array}
Derivation
  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. 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.f6499.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-*.f6499.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 rewrites99.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. Final simplification99.2%

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

Alternative 2: 67.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(z, t, a \cdot b\right)\\ \mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{-111}:\\ \;\;\;\;\mathsf{fma}\left(i, c, x \cdot y\right)\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+94}:\\ \;\;\;\;\mathsf{fma}\left(i, c, t \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (fma z t (* a b))))
   (if (<= (* a b) -1e+59)
     t_1
     (if (<= (* a b) 5e-111)
       (fma i c (* x y))
       (if (<= (* a b) 5e+94) (fma i c (* t z)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = fma(z, t, (a * b));
	double tmp;
	if ((a * b) <= -1e+59) {
		tmp = t_1;
	} else if ((a * b) <= 5e-111) {
		tmp = fma(i, c, (x * y));
	} else if ((a * b) <= 5e+94) {
		tmp = fma(i, c, (t * z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = fma(z, t, Float64(a * b))
	tmp = 0.0
	if (Float64(a * b) <= -1e+59)
		tmp = t_1;
	elseif (Float64(a * b) <= 5e-111)
		tmp = fma(i, c, Float64(x * y));
	elseif (Float64(a * b) <= 5e+94)
		tmp = fma(i, c, Float64(t * z));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(z * t + N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -1e+59], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 5e-111], N[(i * c + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+94], N[(i * c + N[(t * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, t, a \cdot b\right)\\
\mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{-111}:\\
\;\;\;\;\mathsf{fma}\left(i, c, x \cdot y\right)\\

\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+94}:\\
\;\;\;\;\mathsf{fma}\left(i, c, t \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a b) < -9.99999999999999972e58 or 5.0000000000000001e94 < (*.f64 a b)

    1. Initial program 93.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-*.f6485.6

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

      \[\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 rewrites76.8%

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{b}, t \cdot z\right) \]
      2. Step-by-step derivation
        1. Applied rewrites79.4%

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

        if -9.99999999999999972e58 < (*.f64 a b) < 5.0000000000000003e-111

        1. Initial program 97.7%

          \[\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 inf

          \[\leadsto \color{blue}{z \cdot \left(t + \left(\frac{a \cdot b}{z} + \frac{x \cdot y}{z}\right)\right)} + c \cdot i \]
        4. Step-by-step derivation
          1. associate-+r+N/A

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

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

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

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

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

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

            \[\leadsto \left(\left(t + \frac{a \cdot b}{z}\right) \cdot z + \left(x \cdot y\right) \cdot \color{blue}{1}\right) + c \cdot i \]
          8. *-rgt-identityN/A

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\frac{a}{z}, b, t\right), z, \color{blue}{y \cdot x}\right) + c \cdot i \]
          17. lower-*.f6494.8

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

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

          \[\leadsto x \cdot \color{blue}{y} + c \cdot i \]
        7. Step-by-step derivation
          1. Applied rewrites71.3%

            \[\leadsto x \cdot \color{blue}{y} + c \cdot i \]
          2. Step-by-step derivation
            1. lift-+.f64N/A

              \[\leadsto \color{blue}{x \cdot y + c \cdot i} \]
            2. +-commutativeN/A

              \[\leadsto \color{blue}{c \cdot i + x \cdot y} \]
            3. lift-*.f64N/A

              \[\leadsto \color{blue}{c \cdot i} + x \cdot y \]
            4. *-commutativeN/A

              \[\leadsto \color{blue}{i \cdot c} + x \cdot y \]
            5. lower-fma.f6471.3

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

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

          if 5.0000000000000003e-111 < (*.f64 a b) < 5.0000000000000001e94

          1. Initial program 97.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.2

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

            \[\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 rewrites72.7%

              \[\leadsto \mathsf{fma}\left(i, c, t \cdot z\right) \]
          8. Recombined 3 regimes into one program.
          9. Final simplification74.0%

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

          Alternative 3: 89.8% accurate, 0.7× speedup?

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

            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. 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.f6495.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-*.f6495.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 rewrites95.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. Taylor expanded in c around 0

              \[\leadsto \mathsf{fma}\left(z, t, \color{blue}{a \cdot b + x \cdot y}\right) \]
            6. Step-by-step derivation
              1. lower-fma.f64N/A

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

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

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

            if -5.0000000000000004e96 < (*.f64 z t) < 1.99999999999999985e75

            1. Initial program 98.7%

              \[\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-*.f6493.2

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, y \cdot x\right)\right)} \]
            6. Step-by-step derivation
              1. Applied rewrites94.5%

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

              if 1.99999999999999985e75 < (*.f64 z t)

              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 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-*.f6489.0

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, \mathsf{fma}\left(t, z, y \cdot x\right)\right)} \]
              6. Step-by-step derivation
                1. Applied rewrites91.0%

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{t}, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]
              7. Recombined 3 regimes into one program.
              8. Final simplification94.3%

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

              Alternative 4: 89.3% accurate, 0.7× speedup?

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

                1. Initial program 92.0%

                  \[\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-*.f6490.7

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

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

                if -1e9 < (*.f64 z t) < 1.99999999999999985e75

                1. Initial program 98.5%

                  \[\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.7

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, y \cdot x\right)\right)} \]
                6. Step-by-step derivation
                  1. Applied rewrites96.1%

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

                  if 1.99999999999999985e75 < (*.f64 z t)

                  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 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-*.f6489.0

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, \mathsf{fma}\left(t, z, y \cdot x\right)\right)} \]
                  6. Step-by-step derivation
                    1. Applied rewrites91.0%

                      \[\leadsto \mathsf{fma}\left(z, \color{blue}{t}, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]
                  7. Recombined 3 regimes into one program.
                  8. Final simplification93.8%

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

                  Alternative 5: 89.3% accurate, 0.7× speedup?

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

                    1. Initial program 93.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-*.f6490.0

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

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

                    if -1e9 < (*.f64 z t) < 1.99999999999999985e75

                    1. Initial program 98.5%

                      \[\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.7

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, y \cdot x\right)\right)} \]
                    6. Step-by-step derivation
                      1. Applied rewrites96.1%

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

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

                    Alternative 6: 88.1% accurate, 0.7× speedup?

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

                      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 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-*.f6485.9

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

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

                      if -5.00000000000000028e-33 < (*.f64 x y) < 9.99999999999999943e-68

                      1. Initial program 99.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-*.f6497.5

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

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

                      if 9.99999999999999943e-68 < (*.f64 x y)

                      1. Initial program 92.2%

                        \[\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-*.f6491.2

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -5 \cdot 10^{-33}:\\ \;\;\;\;\mathsf{fma}\left(i, c, \mathsf{fma}\left(t, z, x \cdot y\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 10^{-67}:\\ \;\;\;\;\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, x \cdot y\right)\right)\\ \end{array} \]
                    5. Add Preprocessing

                    Alternative 7: 88.6% accurate, 0.7× speedup?

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

                      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 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-*.f6488.0

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

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

                      if -4.99999999999999973e65 < (*.f64 x y) < 9.99999999999999943e-68

                      1. Initial program 98.5%

                        \[\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-*.f6494.9

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+65}:\\ \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, x \cdot y\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 10^{-67}:\\ \;\;\;\;\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, x \cdot y\right)\right)\\ \end{array} \]
                    5. Add Preprocessing

                    Alternative 8: 86.5% accurate, 0.7× speedup?

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

                      1. Initial program 91.9%

                        \[\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 inf

                        \[\leadsto \color{blue}{z \cdot \left(t + \left(\frac{a \cdot b}{z} + \frac{x \cdot y}{z}\right)\right)} + c \cdot i \]
                      4. Step-by-step derivation
                        1. associate-+r+N/A

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

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

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

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

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

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

                          \[\leadsto \left(\left(t + \frac{a \cdot b}{z}\right) \cdot z + \left(x \cdot y\right) \cdot \color{blue}{1}\right) + c \cdot i \]
                        8. *-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto x \cdot \color{blue}{y} + c \cdot i \]
                      7. Step-by-step derivation
                        1. Applied rewrites86.8%

                          \[\leadsto x \cdot \color{blue}{y} + c \cdot i \]
                        2. Step-by-step derivation
                          1. lift-+.f64N/A

                            \[\leadsto \color{blue}{x \cdot y + c \cdot i} \]
                          2. +-commutativeN/A

                            \[\leadsto \color{blue}{c \cdot i + x \cdot y} \]
                          3. lift-*.f64N/A

                            \[\leadsto \color{blue}{c \cdot i} + x \cdot y \]
                          4. *-commutativeN/A

                            \[\leadsto \color{blue}{i \cdot c} + x \cdot y \]
                          5. lower-fma.f6486.8

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

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

                        if -1e189 < (*.f64 x y) < 1.99999999999999998e132

                        1. Initial program 97.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-*.f6487.6

                            \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
                        5. Applied rewrites87.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.4%

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

                      Alternative 9: 66.5% accurate, 0.9× speedup?

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

                        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-*.f6475.7

                            \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
                        5. Applied rewrites75.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 rewrites73.2%

                            \[\leadsto \mathsf{fma}\left(a, \color{blue}{b}, t \cdot z\right) \]
                          2. Step-by-step derivation
                            1. Applied rewrites75.6%

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

                            if -5.0000000000000004e96 < (*.f64 z t) < 1.99999999999999985e75

                            1. Initial program 98.7%

                              \[\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-*.f6493.2

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

                              \[\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 rewrites61.7%

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

                                \[\leadsto a \cdot b + \color{blue}{c \cdot i} \]
                              3. Step-by-step derivation
                                1. Applied rewrites62.3%

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

                                if 1.99999999999999985e75 < (*.f64 z t)

                                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 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-*.f6489.0

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

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, \mathsf{fma}\left(t, z, y \cdot x\right)\right)} \]
                                6. Step-by-step derivation
                                  1. Applied rewrites91.0%

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

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

                                      \[\leadsto \mathsf{fma}\left(z, t, i \cdot c\right) \]
                                  4. Recombined 3 regimes into one program.
                                  5. Final simplification68.1%

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

                                  Alternative 10: 66.5% accurate, 0.9× speedup?

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

                                    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-*.f6475.7

                                        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
                                    5. Applied rewrites75.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 rewrites73.2%

                                        \[\leadsto \mathsf{fma}\left(a, \color{blue}{b}, t \cdot z\right) \]
                                      2. Step-by-step derivation
                                        1. Applied rewrites75.6%

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

                                        if -5.0000000000000004e96 < (*.f64 z t) < 1.99999999999999985e75

                                        1. Initial program 98.7%

                                          \[\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-*.f6493.2

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

                                          \[\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 rewrites61.7%

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

                                            \[\leadsto a \cdot b + \color{blue}{c \cdot i} \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites62.3%

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

                                            if 1.99999999999999985e75 < (*.f64 z t)

                                            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 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-*.f6489.0

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

                                              \[\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 rewrites79.3%

                                                \[\leadsto \mathsf{fma}\left(i, c, t \cdot z\right) \]
                                            8. Recombined 3 regimes into one program.
                                            9. Final simplification67.7%

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

                                            Alternative 11: 65.7% accurate, 0.9× speedup?

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

                                              1. Initial program 93.0%

                                                \[\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-*.f6479.1

                                                  \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
                                              5. Applied rewrites79.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 rewrites71.2%

                                                  \[\leadsto \mathsf{fma}\left(a, \color{blue}{b}, t \cdot z\right) \]
                                                2. Step-by-step derivation
                                                  1. Applied rewrites73.2%

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

                                                  if -5.0000000000000004e96 < (*.f64 z t) < 4.99999999999999977e-7

                                                  1. Initial program 98.6%

                                                    \[\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.1

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

                                                    \[\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 rewrites63.2%

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

                                                      \[\leadsto a \cdot b + \color{blue}{c \cdot i} \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites63.8%

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

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;t \cdot z \leq -5 \cdot 10^{+96}:\\ \;\;\;\;\mathsf{fma}\left(z, t, a \cdot b\right)\\ \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{-7}:\\ \;\;\;\;\mathsf{fma}\left(i, c, a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z, t, a \cdot b\right)\\ \end{array} \]
                                                    6. Add Preprocessing

                                                    Alternative 12: 62.7% accurate, 0.9× speedup?

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

                                                      1. Initial program 93.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-*.f6468.6

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

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

                                                      if -4.99999999999999989e101 < (*.f64 c i) < 4.0000000000000002e117

                                                      1. Initial program 97.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-*.f6466.0

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

                                                        \[\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 rewrites58.3%

                                                          \[\leadsto \mathsf{fma}\left(a, \color{blue}{b}, t \cdot z\right) \]
                                                        2. Step-by-step derivation
                                                          1. Applied rewrites59.5%

                                                            \[\leadsto \mathsf{fma}\left(z, t, b \cdot a\right) \]
                                                        3. Recombined 2 regimes into one program.
                                                        4. Final simplification62.3%

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

                                                        Alternative 13: 62.7% accurate, 0.9× speedup?

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

                                                          1. Initial program 93.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-*.f6468.6

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

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

                                                          if -4.99999999999999989e101 < (*.f64 c i) < 4.0000000000000002e117

                                                          1. Initial program 97.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-*.f6466.0

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

                                                            \[\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 rewrites58.3%

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

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

                                                          Alternative 14: 42.7% accurate, 1.1× speedup?

                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \cdot z \leq -5 \cdot 10^{+96}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{-7}:\\ \;\;\;\;c \cdot i\\ \mathbf{else}:\\ \;\;\;\;t \cdot z\\ \end{array} \end{array} \]
                                                          (FPCore (x y z t a b c i)
                                                           :precision binary64
                                                           (if (<= (* t z) -5e+96) (* t z) (if (<= (* t z) 5e-7) (* c i) (* t z))))
                                                          double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                          	double tmp;
                                                          	if ((t * z) <= -5e+96) {
                                                          		tmp = t * z;
                                                          	} else if ((t * z) <= 5e-7) {
                                                          		tmp = c * i;
                                                          	} 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 ((t * z) <= (-5d+96)) then
                                                                  tmp = t * z
                                                              else if ((t * z) <= 5d-7) then
                                                                  tmp = c * i
                                                              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 ((t * z) <= -5e+96) {
                                                          		tmp = t * z;
                                                          	} else if ((t * z) <= 5e-7) {
                                                          		tmp = c * i;
                                                          	} else {
                                                          		tmp = t * z;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          def code(x, y, z, t, a, b, c, i):
                                                          	tmp = 0
                                                          	if (t * z) <= -5e+96:
                                                          		tmp = t * z
                                                          	elif (t * z) <= 5e-7:
                                                          		tmp = c * i
                                                          	else:
                                                          		tmp = t * z
                                                          	return tmp
                                                          
                                                          function code(x, y, z, t, a, b, c, i)
                                                          	tmp = 0.0
                                                          	if (Float64(t * z) <= -5e+96)
                                                          		tmp = Float64(t * z);
                                                          	elseif (Float64(t * z) <= 5e-7)
                                                          		tmp = Float64(c * i);
                                                          	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 ((t * z) <= -5e+96)
                                                          		tmp = t * z;
                                                          	elseif ((t * z) <= 5e-7)
                                                          		tmp = c * i;
                                                          	else
                                                          		tmp = t * z;
                                                          	end
                                                          	tmp_2 = tmp;
                                                          end
                                                          
                                                          code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(t * z), $MachinePrecision], -5e+96], N[(t * z), $MachinePrecision], If[LessEqual[N[(t * z), $MachinePrecision], 5e-7], N[(c * i), $MachinePrecision], N[(t * z), $MachinePrecision]]]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \begin{array}{l}
                                                          \mathbf{if}\;t \cdot z \leq -5 \cdot 10^{+96}:\\
                                                          \;\;\;\;t \cdot z\\
                                                          
                                                          \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{-7}:\\
                                                          \;\;\;\;c \cdot i\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;t \cdot z\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 2 regimes
                                                          2. if (*.f64 z t) < -5.0000000000000004e96 or 4.99999999999999977e-7 < (*.f64 z t)

                                                            1. Initial program 93.0%

                                                              \[\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-*.f6487.7

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

                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, \mathsf{fma}\left(t, z, y \cdot x\right)\right)} \]
                                                            6. Step-by-step derivation
                                                              1. Applied rewrites87.7%

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

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

                                                                  \[\leadsto \color{blue}{t \cdot z} \]
                                                              4. Applied rewrites60.9%

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

                                                              if -5.0000000000000004e96 < (*.f64 z t) < 4.99999999999999977e-7

                                                              1. Initial program 98.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-*.f6438.3

                                                                  \[\leadsto \color{blue}{i \cdot c} \]
                                                              5. Applied rewrites38.3%

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

                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;t \cdot z \leq -5 \cdot 10^{+96}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{-7}:\\ \;\;\;\;c \cdot i\\ \mathbf{else}:\\ \;\;\;\;t \cdot z\\ \end{array} \]
                                                            9. Add Preprocessing

                                                            Alternative 15: 43.3% accurate, 1.1× speedup?

                                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \cdot i \leq -5 \cdot 10^{+88}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;c \cdot i \leq 4 \cdot 10^{+37}:\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;c \cdot i\\ \end{array} \end{array} \]
                                                            (FPCore (x y z t a b c i)
                                                             :precision binary64
                                                             (if (<= (* c i) -5e+88) (* c i) (if (<= (* c i) 4e+37) (* a b) (* c i))))
                                                            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                            	double tmp;
                                                            	if ((c * i) <= -5e+88) {
                                                            		tmp = c * i;
                                                            	} else if ((c * i) <= 4e+37) {
                                                            		tmp = a * b;
                                                            	} else {
                                                            		tmp = c * i;
                                                            	}
                                                            	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 ((c * i) <= (-5d+88)) then
                                                                    tmp = c * i
                                                                else if ((c * i) <= 4d+37) then
                                                                    tmp = a * b
                                                                else
                                                                    tmp = c * i
                                                                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 ((c * i) <= -5e+88) {
                                                            		tmp = c * i;
                                                            	} else if ((c * i) <= 4e+37) {
                                                            		tmp = a * b;
                                                            	} else {
                                                            		tmp = c * i;
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            def code(x, y, z, t, a, b, c, i):
                                                            	tmp = 0
                                                            	if (c * i) <= -5e+88:
                                                            		tmp = c * i
                                                            	elif (c * i) <= 4e+37:
                                                            		tmp = a * b
                                                            	else:
                                                            		tmp = c * i
                                                            	return tmp
                                                            
                                                            function code(x, y, z, t, a, b, c, i)
                                                            	tmp = 0.0
                                                            	if (Float64(c * i) <= -5e+88)
                                                            		tmp = Float64(c * i);
                                                            	elseif (Float64(c * i) <= 4e+37)
                                                            		tmp = Float64(a * b);
                                                            	else
                                                            		tmp = Float64(c * i);
                                                            	end
                                                            	return tmp
                                                            end
                                                            
                                                            function tmp_2 = code(x, y, z, t, a, b, c, i)
                                                            	tmp = 0.0;
                                                            	if ((c * i) <= -5e+88)
                                                            		tmp = c * i;
                                                            	elseif ((c * i) <= 4e+37)
                                                            		tmp = a * b;
                                                            	else
                                                            		tmp = c * i;
                                                            	end
                                                            	tmp_2 = tmp;
                                                            end
                                                            
                                                            code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -5e+88], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 4e+37], N[(a * b), $MachinePrecision], N[(c * i), $MachinePrecision]]]
                                                            
                                                            \begin{array}{l}
                                                            
                                                            \\
                                                            \begin{array}{l}
                                                            \mathbf{if}\;c \cdot i \leq -5 \cdot 10^{+88}:\\
                                                            \;\;\;\;c \cdot i\\
                                                            
                                                            \mathbf{elif}\;c \cdot i \leq 4 \cdot 10^{+37}:\\
                                                            \;\;\;\;a \cdot b\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;c \cdot i\\
                                                            
                                                            
                                                            \end{array}
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 2 regimes
                                                            2. if (*.f64 c i) < -4.99999999999999997e88 or 3.99999999999999982e37 < (*.f64 c i)

                                                              1. Initial program 94.2%

                                                                \[\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-*.f6461.1

                                                                  \[\leadsto \color{blue}{i \cdot c} \]
                                                              5. Applied rewrites61.1%

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

                                                              if -4.99999999999999997e88 < (*.f64 c i) < 3.99999999999999982e37

                                                              1. Initial program 98.0%

                                                                \[\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-*.f6463.6

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

                                                                \[\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 rewrites60.5%

                                                                  \[\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 rewrites31.3%

                                                                    \[\leadsto b \cdot a \]
                                                                4. Recombined 2 regimes into one program.
                                                                5. Final simplification43.3%

                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;c \cdot i \leq -5 \cdot 10^{+88}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;c \cdot i \leq 4 \cdot 10^{+37}:\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;c \cdot i\\ \end{array} \]
                                                                6. Add Preprocessing

                                                                Alternative 16: 26.9% accurate, 5.0× speedup?

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

                                                                    \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(i, c, \color{blue}{t \cdot z}\right)\right) \]
                                                                5. Applied rewrites71.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 rewrites47.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 rewrites23.8%

                                                                      \[\leadsto b \cdot a \]
                                                                    2. Final simplification23.8%

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

                                                                    Reproduce

                                                                    ?
                                                                    herbie shell --seed 2024284 
                                                                    (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)))