From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,efbbbab26bad9cb X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-16 05:36:45 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Cephus�" Newsgroups: comp.lang.ada Subject: Re: how to round integers (Figured it out!) Date: Mon, 16 Jun 2003 07:36:37 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:39242 Date: 2003-06-16T07:36:37-05:00 List-Id: David C. Hoos wrote: > It's simpler to just add one less than the divisor to the dividend > before dividing. well look at if the total is 25. in your example, 25+3-1 = 27. That would give you 27/3 = 9 but it is really 25/3 which equals 8 remainder 1 which is not enough to round up... Beau