Article View: comp.lang.modula2
Article #4230Re: MathLib0 procedures
From: Alan Lovejoy
Date: Tue, 10 May 1988 01:34
Date: Tue, 10 May 1988 01:34
24 lines
1440 bytes
1440 bytes
In article <INFO-M2%88050910174344@DB0TUI11> Info-Modula2 Distribution List <INFO-M2%UCF1VM.bitnet@jade.berkeley.edu> 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!
Technical Details
Message-ID:
<3098@pdn.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!pdn!alanReferences:
<INFO-M2%88050910174344@DB0TUI11>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <INFO-M2%88050910174344@DB0TUI11> Reply-To: alan@pdn.UUCP (0000-Alan Lovejoy) Organization: Paradyne Corporation, Largo, Florida Lines: 24