PLOGHELP DIV Jonathan Laventhol, June 1983 Revised by Kathryn Seifert October 1986 Operator returning the integer result of the division of two integers ?- X is div . Keywords: division, arithmetic, integer, evaluation, operator A goal of the following form: ?- X is Y div Z. will succeed if X is the integer result of dividing Y by Z. Y and Z must be instantiated as integers. For example: ?- 3 is 10 div 3. yes By default, 'div' is declared with precedence 21 and fix "yfx". You can get the remainder resulting from the division of one number by another using 'mod': see PLOGHELP * MOD. You can also divide non-integer numbers and get ratio or decimal results by using the operator '/': see PLOGHELP * DIVIDE. -- RELATED DOCUMENTATION ---------------------------------------------- PLOGHELP * ARITHMETIC Overview of HELP and REF files providing information about numbers their representation in Poplog and operations on them. PLOGHELP * DIVIDE Operator which divides one number by another PLOGHELP * IS Evaluating POP-11 and arithmetic expressions which return one result PLOGHELP * MOD Operator returning the remainder after the division of two integers PLOGHELP * SYMBOLS Summary and index of HELP files for symbols used in Prolog PLOGHELP * OPERATORS Operator declarations made when the Prolog system is loaded PLOGHELP * OP How to declare operators --- C.all/plog/help/div ------------------------------------------------ --- Copyright University of Sussex 1987. All rights reserved. ----------