note description: "[ Objects to which numerical operations are applicable Note: The model is that of a commutative ring. ]" library: "Free implementation of ELKS library" status: "See notice at end of class." legal: "See notice at end of class." date: "$Date: 2020-04-15 18:06:04 +0000 (Wed, 15 Apr 2020) $" revision: "$Revision: 104046 $" deferred class interface NUMERIC feature -- Access one: like Current -- Neutral element for "*" and "/" ensure result_exists: Result /= Void zero: like Current -- Neutral element for "+" and "-" ensure result_exists: Result /= Void feature -- Status report divisible (other: like Current): BOOLEAN -- May current object be divided by other? require other_exists: other /= Void feature -- Basic operations plus alias "+" (other: like Current): like Current -- Sum with other (commutative). require other_exists: other /= Void ensure result_exists: Result /= Void commutative: Result ~ (other + Current) minus alias "-" alias "−" (other: like Current): like Current -- Result of subtracting other require other_exists: other /= Void ensure result_exists: Result /= Void product alias "*" alias "×" (other: like Current): like Current -- Product by other require other_exists: other /= Void ensure result_exists: Result /= Void quotient alias "/" alias "÷" (other: like Current): like Current -- Division by other require other_exists: other /= Void good_divisor: divisible (other) ensure result_exists: Result /= Void identity alias "+": like Current -- Unary plus ensure result_exists: Result /= Void opposite alias "-" alias "−": like Current -- Unary minus ensure result_exists: Result /= Void note copyright: "Copyright (c) 1984-2020, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class NUMERIC
Generated by ISE EiffelStudio