public static bool RoughlyEquals(this double value, double origin) { // Stupidest way. But if it works, is it so stupid? Yes, it is. var first = value.ToInvariantString(); var second = origin.ToInvariantString(); return first.Length > second.Length ? Equals(first.Substring(0, second.Length), second) : Equals(first, second); }