15 private static readonly
int hashCode = typeof(
RationalNumbers).FullName.GetHashCode();
51 return Obj is BigInteger || Obj is double;
55 public override bool Equals(
object obj)
100 n1 = BigInteger.Zero;
116 n2 = BigInteger.Zero;
120 BigInteger l = n1 * d2;
121 BigInteger r = n2 * d1;
123 return l.CompareTo(r);
Base class for all types of elements.
abstract object AssociatedObjectValue
Associated object value.
Base class for all types of fields.
Field of rational numbers.
override IAbelianGroupElement Zero
Returns the zero element of the group.
int Compare(IElement x, IElement y)
Compares two rational numbers.
static readonly RationalNumbers Instance
Instance of the set of integers.
override string ToString()
static int CompareNumbers(IElement x, IElement y)
Compares two rational numbers.
override bool Equals(object obj)
Compares the element to another. If elements are equal.
RationalNumbers()
Field of rational numbers.
override bool Contains(IElement Element)
Checks if the set contains an element.
override int GetHashCode()
Calculates a hash code of the element. Hash code.
override ICommutativeRingWithIdentityElement One
Returns the identity element of the commutative ring with identity.
Basic interface for all types of abelian group elements.
Basic interface for all types of commutative ring with identity elements.
Basic interface for all types of elements.
object AssociatedObjectValue
Associated object value.
Basic interface for ordered sets.