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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Many overlook the possibility sin(x,360.0) ? Date: Mon, 1 May 2017 22:04:10 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <3e7f9789-a0af-4342-a42e-46a6258d7801@googlegroups.com> NNTP-Posting-Host: BYuA7L7MRjuLLjcoGHOBxw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:46651 Date: 2017-05-01T22:04:10+02:00 List-Id: On 2017-05-01 19:46, Nasser M. Abbasi wrote: > On 5/1/2017 12:22 AM, reinert wrote: >> Not a big philosophical question, but: >> >> I have often seen in (others) Ada code that many prefer to use for >> example sin(x) >> where they first calculate x := rad_per_degree*degrees. >> >> Why they do not use sin(degrees,360.0) if they need to use degree. >> Are there a good reason? Using sin(x, 3600.0) seems to keep the code >> simpler. Sometimes I even use sin(x,period). I remember the first thing they taught us during the first semester was to ditch degrees... > btw, These are implemented in other languages as follows: > > In Mathematica one can type > > Sin[ 360 Degree] > > in Matlab one uses sind(360) instead of sin() for degrees. Which is *exactly* same as in Ada. The notation 300 Degree is = *. rad_per_degree = Degree = Pi/180.0 is here (dimensionless). -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de