Re: Proposal: Trigonometric functions in degrees - Mailing list pgsql-hackers

From David Fetter
Subject Re: Proposal: Trigonometric functions in degrees
Date
Msg-id 20151025152118.GC2404@fetter.org
Whole thread Raw
In response to Re: Proposal: Trigonometric functions in degrees  (Emre Hasegeli <emre@hasegeli.com>)
List pgsql-hackers
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 <david@fetter.org> 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



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Proposal: Trigonometric functions in degrees
Next
From: Simon Riggs
Date:
Subject: Re: make Gather node projection-capable