From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!seismo!rochester!pt.cs.cmu.edu!sei.cmu.edu!firth From: firth@sei.cmu.edu (Robert Firth) Newsgroups: net.lang.ada Subject: Re: Getting the integer part of a real Message-ID: <389@aw.sei.cmu.edu.sei.cmu.edu> Date: Fri, 7-Nov-86 08:47:38 EST Article-I.D.: aw.389 Posted: Fri Nov 7 08:47:38 1986 Date-Received: Sat, 8-Nov-86 05:00:01 EST References: <38000034@gypsy.UUCP> Sender: netnews@sei.cmu.edu Reply-To: firth@bd.sei.cmu.edu.UUCP (PUT YOUR NAME HERE) Organization: Carnegie-Mellon University, SEI, Pgh, Pa List-Id: Given x : float; i : integer; then the line if (i > x) then ... won't work, since ">" isn't defined between integers and floats. This is perhaps what is meant: if float(i) > x then ... However, this does not really help the hard-core numerical programmer, who most likely wants X rounded but left in FLOATING representation - since otherwise he can use only a very restricted subrange of float. What we really need is the set function FLOOR (X : FLOAT) return FLOAT; CEIL ROUND TRUNC and let's make them generic in the domain type.