public static bool IsUnity(this Polynomial p) { return(DoubleUtils.MachineEquality(p.Coeffs[0], 1.0) && p.Coeffs.Skip(1).All(DoubleUtils.EqualZero)); }
public static bool IsZero(this Polynomial p) { return(p.Coeffs.All(DoubleUtils.EqualZero)); }