Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!uwvax!oddjob!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: sizes, bitfields, etc Message-ID: <12982@mimsy.UUCP> Date: 12 Aug 88 22:44:57 GMT References: <214@ISIDAPS5.UUCP> <9641@dartvax.Dartmouth.EDU> <62505@sun.uucp> <584@philmds.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 20 >In article <12933@mimsy.UUCP> I wrote >>where ROUNDUP is a compile-time expression ... >> #define ROUNDUP(x, y) (floor(((x) + (y) - 1) / (y)) * (y)) In article <584@philmds.UUCP> leo@philmds.UUCP (Leo de Wit) writes: >Compile-time expression? This would imply that the compiler knows of floor() Oops. I originally wrote ROUNDUP a b: floor( ... ) or something equally un-C-like (since this was intended not to be a C-centric argument), and I put in the floor() to indicate that the division should not be doing in rational or fixed- or floating-point arithmetic. I then decided that this would be overly confusing and switched to the C syntax, without removing the floor() or adding any explanation. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris