Path: utzoo!attcan!uunet!mcsun!hp4nl!charon!dik From: dik@cwi.nl (Dik T. Winter) Newsgroups: comp.lang.c Subject: Re: Why do most C compilers poxily round towards zero ? Message-ID: <2324@charon.cwi.nl> Date: 12 Oct 90 01:25:23 GMT References: <1990Oct9.230928.27552@arp.anu.oz.au> <1990Oct11.161737.10969@zoo.toronto.edu> Sender: news@cwi.nl Organization: CWI, Amsterdam Lines: 16 In article <1990Oct11.161737.10969@zoo.toronto.edu> henry@zoo.toronto.edu (Henry Spencer) writes: > In article shirono@ssd.csd.harris.com writes: > >It is important to understand that, in type demotion, C doesn't round > >either way; it simply eliminates that which it cannot use. > > This is a form of rounding (although not a very useful one). There are > half a dozen different rounding algorithms; "rounding" is not a precise > term referring to one and only one. I tend to disagree, but this may be quibbling. Rounding is a very precise term. You may round a floating point value to an integer, or a real number to a floating point value. That is what rounding does: giving less precision. But as Henry Spencer notes: there are several rounding algorithms (cf. IEEE). -- dik t. winter, cwi, amsterdam, nederland dik@cwi.nl