comp.lang.ada
 help / color / mirror / Atom feed
From: "Nasser M. Abbasi" <nma@12000.org>
Subject: Re: Many overlook the possibility sin(x,360.0) ?
Date: Mon, 1 May 2017 12:46:02 -0500
Date: 2017-05-01T12:46:02-05:00	[thread overview]
Message-ID: <oe7s8n$1l82$1@gioia.aioe.org> (raw)
In-Reply-To: 3e7f9789-a0af-4342-a42e-46a6258d7801@googlegroups.com

On 5/1/2017 12:22 AM, reinert wrote:
> Hi,
>
> 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).
>
> reinert
>

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.

--Nasser



  parent reply	other threads:[~2017-05-01 17:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-01  5:22 Many overlook the possibility sin(x,360.0) ? reinert
2017-05-01  8:50 ` hreba
2017-05-01 17:46 ` Nasser M. Abbasi [this message]
2017-05-01 20:04   ` Dmitry A. Kazakov
2017-05-01 20:46     ` Shark8
2017-05-02  6:37       ` reinert
2017-05-02  8:35         ` Dmitry A. Kazakov
2017-05-03  4:12           ` reinert
2017-05-03  7:18             ` Dmitry A. Kazakov
2017-05-08 17:37               ` reinert
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox