Path: utzoo!mnetor!uunet!pdn!alan From: alan@pdn.UUCP (Alan Lovejoy) Newsgroups: comp.lang.modula2 Subject: Re: MathLib0 procedures Message-ID: <3098@pdn.UUCP> Date: 10 May 88 01:34:24 GMT References:Reply-To: alan@pdn.UUCP (0000-Alan Lovejoy) Organization: Paradyne Corporation, Largo, Florida Lines: 24 In article Info-Modula2 Distribution List writes: >Is the > PROCEDURE real(x:INTEGER): REAL; >only another form of FLOAT(CARDINAL(x)) Real is a function defined on INTEGERs instead of CARDINALs. Note that if x < 0, then CARDINAL(x) is gibberish. >or is the > PROCEDURE entier(x:REAL): INTEGER; >just another form of INTEGER(TRUNC(x)) ? Entier is a function whose domain is the INTEGERs, not the natural numbers (CARDINALs). It is known in American math jargon as "floor". It returns the greatest number not less than its input, where greater and lesser are defined arithmetically, not in terms of absolute magnitude. The distinction is important for INTEGERs, but not for CARDINALs. -- Alan Lovejoy; alan@pdn; 813-530-8241; Paradyne Corporation: Largo, Florida. Disclaimer: Do not confuse my views with the official views of Paradyne Corporation (regardless of how confusing those views may be). Motto: Never put off to run-time what you can do at compile-time!