comp.lang.ada
 help / color / mirror / Atom feed
From: Michael Stark <mstark@cs.umd.edu>
Subject: Re: trunc
Date: 1999/03/19
Date: 1999-03-19T15:52:28+00:00	[thread overview]
Message-ID: <36F272BB.5355@cs.umd.edu> (raw)
In-Reply-To: 36F17B6D.E4B7115@averstar.com

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




  reply	other threads:[~1999-03-19  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-18  0:00 trunc phadreus
1999-03-18  0:00 ` trunc Matthew Heaney
1999-03-18  0:00   ` trunc Nick Roberts
1999-03-18  0:00   ` trunc Tucker Taft
1999-03-19  0:00     ` Michael Stark [this message]
1999-03-19  0:00 ` trunc Michael F Brenner
1999-03-19  0:00   ` trunc Markus Kuhn
1999-03-22  0:00   ` trunc Howard W. LUDWIG
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox