Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Sep 21 20:06:49 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id m8M36nl5018622 for ; Sun, 21 Sep 2008 20:06:49 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id m8M3952I007398 for ; Sun, 21 Sep 2008 20:09:05 -0700 Message-Id: <200809220309.m8M3952I007398@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: round Date: Sun, 21 Sep 2008 20:09:05 -0700 From: Bill Cheng Someone wrote: > just a quick question... > does ROUND macro and ROUND function (math.h) behave differently? > isn't it better to use BUILT IN round function of math.h rather > than creating > a MACRO. The round() function in returns a double. I'm not 100% what would happen if you typecast it to an int. I hope it would do the right thing, but I'm not 100% sure. If you are sure, please use it. If not, you can use the round() macro defined in the spec. -- Bill Cheng // bill.cheng@usc.edu