public boolean equals(Object o) { if (!(o instanceof FloatTerm)) { return false; } FloatTerm ft = (FloatTerm) o; // Use the floating point comparer to allow for round-off errors. return StandardFloatingPointComparator.getFloat().equals(f, ft.f); }
public int compareTo(ITerm o) { if (o == null) { return 1; } FloatTerm ft = (FloatTerm) o; return StandardFloatingPointComparator.getFloat().compare(f, ft.f); }