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-Thread: 103376,9fe315ab08ea9576 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.213.68 with SMTP id nq4mr6123734pbc.2.1328978844756; Sat, 11 Feb 2012 08:47:24 -0800 (PST) Path: wr5ni12926pbc.0!nntp.google.com!news2.google.com!goblin2!goblin.stu.neva.ru!aioe.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Arctan: to use with single or with double arguments? Date: Sat, 11 Feb 2012 16:47:23 +0000 Organization: A noiseless patient Spider Message-ID: References: <908e7aea-ed77-4dce-9f5d-e6341abc1303@s19g2000vbr.googlegroups.com> <53a2a6fa-9d48-4486-b5c7-aea81a026a82@x18g2000pro.googlegroups.com> <6e68502c-7ba3-43a5-9a3e-11ec3810c666@k10g2000yqk.googlegroups.com> <4f369586$0$6625$9b4e6d93@newsspool2.arcor-online.net> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="3723"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/47lHDVn0Z0L1RZaqTROzH7aoaqXHhqKE=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (darwin) Cancel-Lock: sha1:1gBROsa1vlJGLQjdTtlBVPN6q+0= sha1:adfqjmXB9fZkYSiUbaJk/x/0J6E= Content-Type: text/plain; charset=us-ascii Date: 2012-02-11T16:47:23+00:00 List-Id: Georg Bauhaus writes: > On 11.02.12 16:29, Simon Wright wrote: >> AdaMagica writes: >> >>> It's a severe bug to use positional association for Arctan! >> >> Only a bug if you get it wrong. Otherwise it's a meta-bug. >> >> Not sure that Arctan (Y => X, X => Y) is exactly _clear_. > > No clarity at all when the brain switches between coordinate > system conventions, row or column major order, and similar > non-Ada ways of expressing things. Since the semantics of > any program calling Arctan is not changed if the parameter > name X becomes <>, thus > since there will be an absolutely safe change set if such > a name were introduced, isn't it about time to get rid of > names that only a high school delusion holds up against? In Ada2012, with Ada.Numerics.Elementary_Functions; package Naval_Angles is function Bearing (Northings : Float; Eastings : Float) return Float is (Ada.Numerics.Elementary_Functions.Arctan (Y => Eastings, X => Northings)); end Naval_Angles; (not sure that 'bearing' is the right word, since the same coordinate system is used for 'heading' and 'course' ...)