%------------------------------------------------------------------------ % Defines natural and integer division (Ada Style) % % There is no universally agreed semantics for integer division for a % negative argument. For a negative argument, division can be defined % with truncation towards or away from zero. The definition in this % theory truncates toward zero (i.e. div(-7,3) = -2). This is % simpler to compute because div(-i,m) = -div(i,m) and is the % method defined in tha Ada reference manual. The alternate method % (i.e. truncation away from zero: div(-7,3) = -3) is the approach % used in most number theory books. This approach has the % advantage that div(i,m) = the greatest integer less than i/m. % % AUTHOR % ------ % % Ricky W. Butler email: r.w.butler@larc.nasa.gov % Mail Stop 130 fax: (804) 864-4234 % NASA Langley Research Center phone: (804) 864-6198 % Hampton, Virginia 23681-0001 %------------------------------------------------------------------------
BEGIN
IMPORTING floor_div_lems, abs_rews
i,k: VAR int
n: VAR nat
m: VAR posnat
j: VAR nonzero_integer
x: VAR real
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.