comp.lang.ada
 help / color / mirror / Atom feed
From: pipex!bnr.co.uk!demon!cix.compulink.co.uk!sjwright@uunet.uu.net  (Simon W
Subject: Re: Ceiling function in Ada
Date: 10 Apr 93 08:03:09 GMT	[thread overview]
Message-ID: <memo.118337@cix.compulink.co.uk> (raw)

References: <karen.734158490@lobo>
X-Newsreader: TIN [version 1.1 PL6]

Karen George (karen@lobo.canberra.edu.au) wrote:
....
> On the other hand, why wouldn't a high level language provide a
> function as basic as truncate.  This is an easy task at machine level,
> and is not an uncommon task.  The code above is obvious, (after you get
> over the shock of finding out that Integer(x) actually rounds) but is
> less efficient (is efficiency important anymore?) than a straight
> translation to the machine function.
...

We used to produce two variants of the same computer where one (the earlier)
had a single-length Float->Fix instruction that truncated, the other had a
double-length Float->Fix that rounded. The latter always seemed so much more
sensible that I would have been shocked to find Integer (x) truncating!

--
Simon Wright
Ferranti International, Defence Systems Integration

             reply	other threads:[~1993-04-10  8:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-04-10  8:03 pipex!bnr.co.uk!demon!cix.compulink.co.uk!sjwright [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-04-07 12:55 Ceiling function in Ada Tucker Taft
1993-04-06 19:47 Michael Feldman
1993-04-06 12:50 agate!dog.ee.lbl.gov!network.ucsd.edu!munnari.oz.au!csis!dubhe.anu.edu.au
replies disabled

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