Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZqN8A-000678-DN for pgsql-hackers@arkaria.postgresql.org; Sun, 25 Oct 2015 15:22:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZqN89-0000na-RP for pgsql-hackers@arkaria.postgresql.org; Sun, 25 Oct 2015 15:22:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZqN6q-0007jK-EH for pgsql-hackers@postgresql.org; Sun, 25 Oct 2015 15:21:24 +0000 Received: from 173-164-140-181-sfba.hfc.comcastbusiness.net ([173.164.140.181] helo=fetter.org) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZqN6n-0001cY-Mg for pgsql-hackers@postgresql.org; Sun, 25 Oct 2015 15:21:23 +0000 Received: by fetter.org (Postfix, from userid 500) id A68DF60468; Sun, 25 Oct 2015 08:21:18 -0700 (PDT) Date: Sun, 25 Oct 2015 08:21:18 -0700 From: David Fetter To: Emre Hasegeli Cc: Dean Rasheed , PostgreSQL Hackers Subject: Re: Proposal: Trigonometric functions in degrees Message-ID: <20151025152118.GC2404@fetter.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Pg-Spam-Score: -0.9 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On Sun, Oct 25, 2015 at 10:16:41AM +0100, Emre Hasegeli wrote: > > Currently PostgreSQL only has trigonometric functions that work in > > radians. I think it would be quite useful to have an equivalent set of > > functions that worked in degrees. In other environments these are > > commonly spelled sind(), cosd(), etc. > > I would prefer gradian over degree. We can have both, but degree is a good bit better known, which means more users will care about it. People have gone a long way toward dealing with problems like the known correspondence (90° = π/2, etc.) and periodicity (f(x) = f(x+360*n) for integer n, f in (sin, cos, tan, cot, sec, csc), for example). I haven't yet found same in a PostgreSQL-compatible library, though. Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers