Article View: comp.lang.modula2
Article #4229Re: MathLib0 procedures
From: Harvard Townsend
Date: Mon, 09 May 1988 14:02
Date: Mon, 09 May 1988 14:02
22 lines
1414 bytes
1414 bytes
>>Is the
>> PROCEDURE real(x:INTEGER): REAL;
>>only another form of FLOAT(CARDINAL(x))
Correct. That's all our implementation does: "RETURN (FLOAT(x));"
>>or is the
>> PROCEDURE entier(x:REAL): INTEGER;
>>just another form of INTEGER(TRUNC(x)) ?
This one is a little different. I understand it to be the "nearest integer
to REAL x". So I guess it is a TRUNC with rounding. Any REAL number with
a fractional part >= .5 is rounded up to the next highest integer.
Anything < .5 is equivalent to TRUNC(x).
______________________________________
Harvard Townsend, Systems Manager
Dept. of Computing & Information Sciences
Kansas State University, Manhattan, KS 66506 (913)532-6350
CSNET: harv@cis.ksu.edu -or- harv@kansas-state.csnet
BITNET: harv@ksuvax1.bitnet -or- harv%ksuvax1.bitnet@cunyvm.cuny.edu
UUCP: {ihnp4,cbatt,dcdwest}!ncr-sd!ncrwic!ksuvax1!harv
-or- ihnp4!wnuxa!ksuvax1!harv -or- ...!psuvax1!ksuvax1.bitnet!harv
Technical Details
Message-ID:
<8805091402.AA23129@harris.cis.ksu.edu>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!pasteur!ucbvax!harris.cis.ksu.EDU!harvShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!pasteur!ucbvax!harris.cis.ksu.EDU!harv From: harv@harris.cis.ksu.EDU (Harvard Townsend) Newsgroups: comp.lang.modula2 Subject: Re: MathLib0 procedures Message-ID: <8805091402.AA23129@harris.cis.ksu.edu> Date: 9 May 88 14:02:31 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Info-Modula2 Distribution List <INFO-M2%UCF1VM.bitnet@jade.berkeley.edu> Organization: The Internet Lines: 22