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: 2017-03-23 19:18:26 +0000 (Thu, 23 Mar 2017) $" revision: "$Revision: 100033 $" 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 "-" (other: like Current): like Current -- Result of subtracting other require other_exists: other /= Void ensure result_exists: Result /= Void product alias "*" (other: like Current): like Current -- Product by other require other_exists: other /= Void ensure result_exists: Result /= Void quotient 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 "-": like Current -- Unary minus ensure result_exists: Result /= Void note copyright: "Copyright (c) 1984-2017, 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