From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.5 required=3.0 tests=BAYES_05,FROM_ADDR_WS autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 10 Apr 93 08:03:09 GMT From: pipex!bnr.co.uk!demon!cix.compulink.co.uk!sjwright@uunet.uu.net (Simon W right) Subject: Re: Ceiling function in Ada Message-ID: List-Id: References: 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