Top
NUMBER_TOOLS
OUTPUT_STREAM
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)
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_8
-- Sign of Current (0 -1 or 1).
ensure
-1 <= Result;
Result <= 1
end of deferred NUMERIC
All classes inherit from ANY, ANY inherits from
PLATFORM
and PLATFORM inherits from GENERAL.
Generated by short -html_deb on 31 March 2005.