Path: 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 ListOrganization: The Internet Lines: 22 >>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