/// <summary>
        /// Checks stability of polynom
        /// </summary>
        /// <param name="polynom">Polynom</param>
        /// <returns>True if stable and false otherwise</returns>
        public static bool IsStablePolynom(double[] polynom)
        {
            if (polynom.Length == 1)
            {
                return(true);
            }
            if (polynom.Length == 2)
            {
                return((polynom[0] * polynom[1]) > 0);
            }
            double[,] a = GetGurvitzMatrix(polynom);
            double det = RealMatrix.Det(a);

            if (det <= 0)
            {
                return(false);
            }
            for (int i = 1; i < a.GetLength(0); i++)
            {
                double[,] b = RealMatrix.GetMainMinor(a, i);
                det         = RealMatrix.Det(b);
                if (det <= 0)
                {
                    return(false);
                }
            }
            return(true);
        }