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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,16f1030bd366bf59 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!m16g2000yqc.googlegroups.com!not-for-mail From: sjw Newsgroups: comp.lang.ada Subject: Re: About the F-22 software bug Date: Sat, 6 Feb 2010 04:12:31 -0800 (PST) Organization: http://groups.google.com Message-ID: <60554b4a-e36a-4daa-8c21-9600b30a40a9@m16g2000yqc.googlegroups.com> References: <4b6b15d2$0$929$ba4acef3@news.orange.fr> <4YKdnVFQX_suIPbWnZ2dnUVZ_rednZ2d@earthlink.com> <3050ef55-5dde-40ed-8a8f-a2daf245bf86@k19g2000yqc.googlegroups.com> <92a42999-0632-4bc6-8348-29140337c3c6@g29g2000yqe.googlegroups.com> NNTP-Posting-Host: 82.30.110.254 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1265458351 11704 127.0.0.1 (6 Feb 2010 12:12:31 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 6 Feb 2010 12:12:31 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: m16g2000yqc.googlegroups.com; posting-host=82.30.110.254; posting-account=_RXWmAoAAADQS3ojtLFDmTNJCT0N2R4U User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8936 Date: 2010-02-06T04:12:31-08:00 List-Id: On Feb 5, 11:39=A0pm, Phil Clayton wrote: > Interesting to see that 'cyclic fixed point types' are under > discussion: > > http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai05s/ai05-0175-1.txt?rev=3D1.= 2 > > http://www.ada-auth.org/ai-files/minutes/min-0911.html#AI175 Interesting that those discussions are in terms of cyclic *fixed point* types. I agree that at the boundary you need to handle cyclic fixed point. Back in the day, the Ferranti name for these was 'standard angle format'; the F1600 series was a 24-bit machine, and the most significant bit typically represented -180 degrees. Overflow was represented by an optional check, so wrap-round was as easy as pie. But why (on a machine with any sort of floating-point capability) would you want to preserve this anywhere other than at the boundary? On my present system, angles are stored in radians. Handling wrap- round (and sometimes we need to deal with a range -2pi .. 2pi) was not properly dignified with library support from the start, but we've achieved a generic which lets you normalise an angle to -pi <=3D a < pi or to 0 <=3D b < 2pi or to -2pi <=3D c < 2pi with minimal pain. We don't need to worry about latitude!