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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,edb6dd3a3f93fcc0 X-Google-Attributes: gid103376,public From: Michael Stark Subject: Re: trunc Date: 1999/03/19 Message-ID: <36F272BB.5355@cs.umd.edu>#1/1 X-Deja-AN: 456533341 Content-Transfer-Encoding: 7bit References: <7crcfm$tp0$1@nnrp1.dejanews.com> <36F17B6D.E4B7115@averstar.com> Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@cs.umd.edu X-Trace: cronkite.cs.umd.edu 921858748 24788 128.8.126.43 (19 Mar 1999 15:52:28 GMT) Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Mime-Version: 1.0 NNTP-Posting-Date: 19 Mar 1999 15:52:28 GMT Newsgroups: comp.lang.ada Date: 1999-03-19T15:52:28+00:00 List-Id: Tucker Taft wrote: > > Matthew Heaney wrote: > > > > phadreus@my-dejanews.com writes: > > > > > what's the most efficient way within Ada > > > to obtain the whole-number portion Y of > > > a floating-point number X? > > > > > > for example, > > > > > > X = 5.5 Y = 5.0 > > > > > > X = 2.9 Y = 2.0 > > > > T'Floor > > I suspect that T'Truncation is more what they had in mind. > T'Truncation(-3.5) = -3.0, whereas T'Floor(-3.5) = 4.0 Tuck -- I assume you mean T'floor(-3.5) = -4.0 I wouldn't want to confuse anyone more than they are already ;) Mike > > -- > -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ > Technical Director, Distributed IT Solutions (www.averstar.com/tools) > AverStar (formerly Intermetrics, Inc.) Burlington, MA USA -- Michael Stark Goddard Research & Study Fellow University of Maryland, College Park e-mail: mstark@cs.umd.edu phone: (301) 405-2721 "Where have you gone Joe DiMaggio, a nation turns its lonely eyes to you" -- Simon & Garfunkel