public static bool IsInteger(double x) { return(Utilities.CompareValues(x, (int)x)); }
// // Given a list of grounded clauses, add a new value which is structurally unique. // public static bool HasStructurally <T>(List <T> list, T t) where T : ConcreteAST.GroundedClause { return(Utilities.StructuralIndex <T>(list, t) != -1); }
// -1 is an error public static int IntegerRatio(double x, double y) { return(Utilities.CompareValues(x / y, Math.Floor(x / y)) ? (int)Math.Floor(x / y) : -1); }