deferred class interface NUMERIC -- -- This class describes a ring. -- feature(s) from HASHABLE hash_code: INTEGER -- The hash-code value of Current. ensure good_hash_value: Result >= 0 feature(s) from NUMERIC infix "+" (other: like Current): like Current -- Sum with 'other' (commutative). require other /= Void infix "-" (other: like Current): like Current -- Result of substracting other. require other /= Void infix "*" (other: like Current): like Current -- Product by other. require other /= Void infix "/" (other: like Current): NUMERIC -- Division by other. require other /= Void; divisible(other) infix "^" (exp: INTEGER): NUMERIC -- Current raised to exp-th power. require exp >= 0 prefix "+": like Current -- Unary plus of Current. prefix "-": like Current -- Unary minus of Current. divisible (other: like Current): BOOLEAN -- May Current be divided by other ? require other /= Void one: like Current -- Neutral element for "*" and "/". zero: like Current -- Neutral element for "+" and "-". sign: INTEGER -- Sign of Current (0 -1 or 1). ensure - 1 <= Result; Result <= 1 infix "<" (other: like Current): BOOLEAN -- Is Current strictly less than other? infix ">" (other: like Current): BOOLEAN end of deferred NUMERIC