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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2a34b7ad6c6a0774 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 12 Aug 2010 05:57:32 -0500 From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Efficiency of code generated by Ada compilers Date: Thu, 12 Aug 2010 12:04:56 +0100 Reply-To: brian@shapes.demon.co.uk Message-ID: <95l76659olc1u18llv135stqonu87vs6ea@4ax.com> References: <1jn1a4o.1dfllwo1uin3imN%csampson@inetworld.net> <1jn36d6.se2f0g1edjjnyN%csampson@inetworld.net> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-43RgRcnSeRf5njB1Vs5igr318axWZ8JIRToGQwNpq4QzvlEs7Xf+oCaPlMj5w+Am926C1/6Fc22bKIi!cqylJ59vvtuS6DmgUsccxl8IukntY4cmQqToEsDgqH8QTKSYiwRHyd+1b9R8QpyVZK/JtsjgbYVq!JYQ= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 Xref: g2news1.google.com comp.lang.ada:13169 Date: 2010-08-12T12:04:56+01:00 List-Id: On Thu, 12 Aug 2010 00:54:52 -0700, csampson@inetworld.net (Charles H. Sampson) wrote: >Simon Wright wrote: > >> csampson@inetworld.net (Charles H. Sampson) writes: >> >> > I then overloaded "+" and "-" for (Bearing, Turn_Angle) arguments >> > and Bearing return value. In those functions is where the mod 360 >> > occurred. (Actually, mod 360.0, as it were.) >> >> Depending on what is doing the turning, in our application that would >> in some cases have to be mod 720.0 ... > > I'm puzzled. Unless you're very careful, intermediate calculations >could result in a quasi-Bearing of more than 360 degrees but I'm pretty >sure most programmers on my project would have been surprised to see a >real bearing of 360 degrees or more. Some applications must distinguish between odd and even revolutions. Get it wrong and they might backfire. - Brian